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

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
 
G

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 ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,122
Latest member
VinayKumarNevatia_
Top