Using a class derived from System.Web.UI.Page

  • Thread starter Thread starter George Ionescu
  • Start date Start date
G

George Ionescu

Hello All,

I would like to create a class which is derived from System.Web.UI.Page, to
implement my own LoadPageStateFromPersistenceMedium so I've done this:

public class MyCustomPage : System.Web.UI.Page
{
protected override void LoadPageStateFromPersistenceMedium()
{
// some code
}
}

and then

public class WebForm1 : MyCustomPage

However, thid does not work (e.g. All I get is a blank page!).

So, my question is this: how do you create a class derived from
System.Web.UI.Page and use it ?

Thanks.
Regards,
George Ionescu
 
Solved it by moving the class into a separate cs file (it was int the main
page, which was quite stupid).

Thanks to anyone who might have responded ...
 
Back
Top