J
Jure Leskovec
Hi!
I tried to insert a layer between web form class and System.Web.UI.Page.
So I made my own HTMLPage class, wich is derived from System.Web.UI.Page and
web form is derived from HTMLPage class
Everything is OK, except Session object isn't available (All other asp
objects are: Response, Request, Application).
If webform class is derived directly from System.Web.UI.Page, it works fine.
If someone knows the truth, I would be grateful.
- Jure
There's my HTMLPage class code:
' HTML class
Public Class HTMLPage
Inherits System.Web.UI.Page
Sub New()
MyBase.New()
Connection = New
System.Data.OleDb.OleDbConnection(CONNECTION_STRING)
Connection.Open()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'Code to Log to file or database could go here
End Sub
Function CreateATB(ByVal Name As String) As String
CreateATB = "<INPUT type=""text"" id=""atb_" & Name & """
runat=""server"">"
End Function
End Class
I tried to insert a layer between web form class and System.Web.UI.Page.
So I made my own HTMLPage class, wich is derived from System.Web.UI.Page and
web form is derived from HTMLPage class
Everything is OK, except Session object isn't available (All other asp
objects are: Response, Request, Application).
If webform class is derived directly from System.Web.UI.Page, it works fine.
If someone knows the truth, I would be grateful.
- Jure
There's my HTMLPage class code:
' HTML class
Public Class HTMLPage
Inherits System.Web.UI.Page
Sub New()
MyBase.New()
Connection = New
System.Data.OleDb.OleDbConnection(CONNECTION_STRING)
Connection.Open()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'Code to Log to file or database could go here
End Sub
Function CreateATB(ByVal Name As String) As String
CreateATB = "<INPUT type=""text"" id=""atb_" & Name & """
runat=""server"">"
End Function
End Class