Master pages, templates, inheritance

J

John Holmes

With ASP we have setup a pretty good method for maintaining a consistent
look and feel with minimal effort. The method has it's pros and cons, but
the maintenance is minimal. The method consists of utilizing a single
default.asp page to call any page on the site passing query parameters with
the page to determine what page and associated menu to load. The menu info
is maintained in a database and a COM+ dll is utilized to go to the
database, get xml, and use an XSLT template to transform the data into the
HTML needed for the menu.

This all is working fine, but we are discussing moving to ASP.NET and what
our options are for doing something similar. Some of the development team
have issues with the URL since all pages differ only in the query
parameters. There is a security context issue as well. I've looked on the
net and read various articles from using custom controls, inheritance, page
templates, and other schemes. Everything I've looked at has it's own pros
and cons and I haven't really seen anything that looks like 'the' way to do
it.

I've heard mentions of 'master pages' with the new version of .NET but not
much detail about what it will offer. Before I spend a lot of time trying to
come up with something that works for what I want to do I thought I would
ask in this forum and see if there are specific recommendations from the
user community and if anyone has detailed infomation about master pages that
isn't a bunch of marketing hype.

I would think this is a relatively common thing that sites want to do. If
you have thousands of pages on your site that you want to fit into a common
look and feel (header, menu, footer) what's the best way to accomplish this?

Thanks,

John Holmes
Skagit County Information Services
(e-mail address removed)
 
S

Steven Cheng[MSFT]

Hi John,


Thanks for posting in the community!
From your description, you're going to move your classic ASP application
onto the ASP.NET platform. The asp app used to use the Centre Controller
model which used a central page to process all the web requests and
dispatch the proper response content dynamically via the query params. So
you're looking for some references and materials on the similiar
implemention in ASP.NET, yes?
If there is anything I misunderstood, please feel free to let me know.

Based on my experience,in ASP.NET , an certain web page is constructed as a
form, we add controls on to it and the web form has buildin support for
mantain its state infos which is quite different from the classic ASP(all
contents are rendered dynamically via script block in page). Though this
well much eaiser our work on develop web page, it'll sometimes make the
pages redudant because we needn't every page like this and want to
dynamically generate the content based on a certain common page
template(frame), yes?

I've ever read some tech articles of the Microsoft Application Design
pattern. And there is one named "Front Controller" in ASP.NET, which
described implement a central controller via HttpHandler to process all
the web reqeusts of an ASP.NET web app centrally, I think it may be
suitable for you situation. I'm not sure whether you've read the articles,
here are their web links in MSDN:

#Front Controller
http://msdn.microsoft.com/library/en-us/dnpatterns/html/DesFrontController.a
sp?frame=true

#Implementing Front Controller in ASP.NET Using HTTPHandler
http://msdn.microsoft.com/library/en-us/dnpatterns/html/ImpFrontControllerIn
ASP.asp?frame=true

Also, some additional pattern related tech references are also avaliable
there:
#Web Presentation Patterns
http://msdn.microsoft.com/library/en-us/dnpatterns/html/EspWebPresentationPa
tterns.asp?frame=true

#Design and Implementation Guidelines for Web Clients
http://msdn.microsoft.com/library/en-us/dnpag/html/DIforWC-CH02.asp?frame=tr
ue

Hope these helpful. Also, if you have any further questions or ideas,
please always feel free to post here. We'll be glad to discuss on this.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

As for the Enterprise patterns, currently there seems only C# version in
the MSDN library and I've also provide you a simple demo(in vb.net in
another thread in this group).

For the MasterPage, it is a new feature in the ASP.NET's next release
Whidbey which provide us much stronger capability on generating common base
page and customzied derived pages. Here are some tech article introduce
this feature:

#Standardize Your Site Fast With Master Pages
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-standardize-maste
rpages.asp?frame=true

#Master Pages in ASP.NET Whidbey
http://msdn.microsoft.com/library/en-us/dnaspp/html/aspnet-masterpages.asp?f
rame=true

Hope helps.Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

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

Top