1.the response.request,server,session in a self-create class

   class A

 { 
    protected HttpSessionState Session; 
    protected HttpServerUtility Server;
    protected HttpRequest Request;
    procteted HtpResponse Response;

  public A(object parent)
    {
    Try
        {
       Session=((System.Web.Ui.Page)parent).Session;
        Server=((System.Web.Ui.Page)parent).Server;
        Request=((System.Web.Ui.Page)parent).Request;
        Response=((System.Web.Ui.Page)parent).Response;
       }
    Catch
    {
        Session=((System.Web.Ui.UserControl)parent).Session;
        Server=((System.Web.Ui.UserControl)parent).Server;
        Request=((System.Web.Ui.UserControl)parent).Request;
        Response=((System.Web.Ui.UserControl)parent).Response;
    }

  }

     

posted on 2008-01-04 08:19  飞天舞者  阅读(217)  评论(0编辑  收藏  举报

导航

For more information about me, feel free email to me winston.he@hotmail.com