Referencing External Class

M

Mike

Hello,
I am attempting to develop a class that will inherit from
System.Web.UI.Page to serve as a the base class for all of the code
behind classes in my web application.

I would like to store the class as a single file (basepage.cs) and not
in an assembly. (The class does not have access to the ASP.NET Request
Object or Server object when stored as an assebly). How do I go about
referencing this class? Is there a way to add it to the local assembly
cache? Sorry for my ignorance, I'm just being with ASP.NET

Thanks!
Mike Biang
App Developer
Cramer Development
 
P

Pavan

Hi Mike,

You can create the base class in App_Code directory, from where you can
refer this class in your code behind files.

if you declare any namespace for the class, use the namespace in using
directives.

To inherit this class from your code behind, use

partial public class _default : <basepageclass>
{

}

Cheers,

Pavan

in message
news:[email protected]...
 

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,186
Members
46,739
Latest member
Clint8040

Latest Threads

Top