Formatting pages

  • Thread starter Thread starter TomB
  • Start date Start date
T

TomB

In classic asp, I would have my standard page format in an include file,
which I would include on every page. Thus, the whole site has a consistent
look and can be changed through one file.

How do people do this in asp.net? I've been told that I'd need to create a
class inheriting from the Page class. That seems like overkill to me. Is
there a better approach.

Thanks
TomB
 
You can create a user control (.ascx file) which is the ASP.NET replacement
for include files.
 
So if you want to change the look of your page, you have to manipulate each
page?

For example, if you have a "menu" user control on the left hand side, and
decide to go with a horizontal menu along the top. You not only have to
change the user control, but move it on each page?

Thanks Rick
 
You could make that a property of the user control, so that you could tell
it how to lay out. For example, a datalist can do that for you.
 
Thanks again,

I found an old article in Visual Basic Programmer's Journal that talks about
using Page Templates. I haven't read it yet, but I think I'll have a peek
at that.

Thanks for your help
TomB
 
Back
Top