How create a general class from System.Web.UI.Page?

G

Guest

I'm programming in ASP.NET 2.0.
For a set of applications I need to create some general classes that inherit
from System.Web.UI.Page.
In particular, I have tried to construct a class (from System.Web.UI.Page)
that must be the base class for other inherited objects. But I have tried to
aknowledge to VS my class as a class with no success!
I need to know how to do it step by step.
Do you have any suggests for me?
Thanks
 
M

Mark Rae

I'm programming in ASP.NET 2.0.
For a set of applications I need to create some general classes that
inherit
from System.Web.UI.Page.
In particular, I have tried to construct a class (from System.Web.UI.Page)
that must be the base class for other inherited objects. But I have tried
to
aknowledge to VS my class as a class with no success!
I need to know how to do it step by step.
Do you have any suggests for me?


1) Create your base class:

public class MyBaseClass : Page
{
// put your base page stuff here
}


2) Modify existing pages' partial class:

public partial class _default : MyBaseClass
{
// put your individual page stuff here
}
 
A

Aidy

But necessary if you are. The fact that he even asked the question implies
he is not using a web app project. I just wanted to ensure he got a totally
accurate answer.
 

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,780
Messages
2,569,608
Members
45,246
Latest member
softprodigy

Latest Threads

Top