What you want is going to be in ASP.NET 2.0 (Whidbey). For now, you can use
ASCX controls to put in distinct bits of visual information (a control for
the header, a control for the side bar, etc.). You can also pump that in
using the inheritance method, but it's going to be a bit tougher. Remember,
the actual page that is rendered is based on the aspx declarative page,
which inherits from your code behind, which inherits from your base class.
In order to render successfully, you could have something like (VERY much
pseudocode):
page.aspx - inherits from page.aspx.cs:
<asp:PlaceHolde r id="header">
my content here
<asp:PlaceHolde r id="footer">
page.aspx.cs - inherits from BasePage class
....
BasePage.cs
protected System.Web.UI.W ebControls.Plac eHolder header;
protected System.Web.UI.W ebControls.Plac eHolder footer;
header.Controls .Add(/* some nice visual bits here */);
footer.Controls .Add(/* some nice visual bits here */);
As you can start to see, you will be doing visual designing without a
designer or even a declarative syntax - not much fun. I would go the ASCX
route until Whidbey comes out. :-)
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Paul M" <ma****@trials. bham.ac.uk> wrote in message
news:uK******** ******@TK2MSFTN GP10.phx.gbl...
Hi folks,
I've got a page that contains the basic formatting that I need for pretty
much all of my systems pages. It's compiled into it's DLL, distributed to
my application's \bin folder and VS allows me to use the class thus :
Public Class Job
Inherits DefaultPage.Def aultPage
The application compiles and runs and is generally happy, but my
formatting isn't there.
There isn't any functionality in the base class, just formatting (header
graphics and couple of hyperlinks).
Can someone point me in the right direction? Is it even possible, or
should I just stick with an HTML includes reference?
Thanks in advance...
P