473,487 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Referencing External Class

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

Nov 19 '05 #1
1 1622
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

"Mike" wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2783
by: Milind | last post by:
Hi, I was trying to implement a composition relation, somthing of the following type: class A { public: class B {
2
3179
by: Torrance S. | last post by:
Hi, I have a class in an assembly that references a value in web.config like this: <appSettings> <add key="mykey" value="myvalue"/> </appSettings> string temp =...
1
3534
by: DjordjeD | last post by:
I need to call(reference) class member "PrintDestination.PrintDestinationPrinter" from another file. How do I do it, I tried "ReportRenderer.PrintDestination.PrintDestinationPrinter" but it...
1
1456
by: Sasha Nikolic | last post by:
I have defined a managed class ( __gc ) and a unmanaged ( __nogc ) in a separate files (but in the same vc++ dotnet project). I have no problem of referencing the unmanaged class from the menaged...
6
2458
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the...
2
4037
by: Axel | last post by:
Hi, a question about something that seems very simple at first glance: is it possible to reference other controls of a subform in a query window without referencing through the parent form? I...
2
1639
by: Alex Maghen | last post by:
I want to create a utility function that will seach the current page for one of my UserControls by it's type. So, let's say that I have a UserControl whose class I defined as follows: namespace...
3
3931
by: dfranzen | last post by:
Hi *, I'm in the process of porting an ANSI C++ project from a UNIX platform to .NET. After "getting rid of" some platform-specific stuff I managed to compile the first two libraries into mixed...
6
121848
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.