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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top