1.the response.request,server,session in a self-create class
{
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;
}
}