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

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top