public partial class HelloWorldService : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//HttpHelloWorldService.GetInstance().Execute(Request, Response);
//--can the above code be written in the following 3 lines??.......
HttpHelloWorldService.GetInstance();
HttpHelloWorldService hhtt = new HttpHelloWorldService();
hhtt.Execute(Request,Response);
}
}
注意: -HttpHelloWorldService
是一个静态类,有以下两种方法:
-public static HttpHelloWorldService GetInstance()
-public void Execute(HttpRequest request, HttpResponse response)