473,395 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
May 4 '07 #1
6 1662
"Pasquale" <Pa******@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...
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
}
--
http://www.markrae.net

May 4 '07 #2
In addition to Mark's post, ensure the base class is in the App_Code folder.

"Pasquale" <Pa******@discussions.microsoft.comwrote in message
news:09**********************************@microsof t.com...
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

May 4 '07 #3
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:WM******************************@bt.com...
In addition to Mark's post, ensure the base class is in the App_Code
folder.
Not necessary if you're using a web application project...
--
http://www.markrae.net

May 4 '07 #4
Thanks for that! :-)
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Mark Rae" wrote:
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:WM******************************@bt.com...
In addition to Mark's post, ensure the base class is in the App_Code
folder.

Not necessary if you're using a web application project...
--
http://www.markrae.net

May 4 '07 #5
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:13**********************************@microsof t.com...
Thanks for that! :-)
;-)

--
http://www.markrae.net

May 4 '07 #6
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.

"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:OZ**************@TK2MSFTNGP02.phx.gbl...
"Aidy" <ai**@noemail.xxxa.comwrote in message
news:WM******************************@bt.com...
>In addition to Mark's post, ensure the base class is in the App_Code
folder.

Not necessary if you're using a web application project...
--
http://www.markrae.net

May 5 '07 #7

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

Similar topics

1
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
3
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports...
7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
8
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock...
7
by: Philip Wagenaar | last post by:
I use a class to manage tiff's (written by someone else) to splitt multipage tiffs. However, when I run it, it fails, for other people it seems work ok. The method in the class is :public...
9
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
3
by: Richard Skopal | last post by:
In .NET Windows forms I can create a metafile using this code: Graphics grph = aControl.CreateGraphics(); IntPtr ipHDC = grph.GetHdc(); Metafile mf = new Metafile(aImgFilePath, ipHDC,...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.