Re: Basic Web Design Quesion

Tech-Archive recommends: Fix windows errors by optimizing your registry



It depends on the version of .net you are running, and what you are
trying to do.

In .net 2005, the best way to do it is probably Master Pages, as the
other poster stated. You define your site look and feel in a master
page, leaving blank areas to be filled in and customized by each
content page.

In earlier versions (and you can still do all these in 2005) there are
some other methods :

1) Create a base class that all your pages inherit from, and add items
to the form collection in the base class to handle your shared look and
feel. You can also Response.Write from the base class

2) Use user controls, or custom server controls. Put shared look and
feel into these controls, and then drop them onto each page. This is
evry simmilar to the effect you got in classic ASP using server side
includes. The downside to this method is that you must manually modify
each page, and if your overall page design layout changes in the
future, you need to go through and retouch each page again.


JJ wrote:
Having done most of the background sql coding I'm now ready to start
designing my asp.net web pages.

A basic question though - is there a way of having 'common' elements on
pages (e.g. a header)?
This used to be done using frames, but I undertand these are now not
advised.

Basically what I want is to have some text/code that is common to all pages,
but that I only need to update in one place?

Does that make sense??

.



Relevant Pages

  • Re: Basic Web Design Question
    ... 2005 or continue with inheriting a base class... ... Create a base class that all your pages inherit from, ... Use user controls, or custom server controls. ... A basic question though - is there a way of having 'common' elements on ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: OO refactoring trial ??
    ... As long as the concrete Python classes follow the form ... other common-to-all-taunts behavior, perhaps a common constructor, or ... in both Python and Java. ... return values derive from a common base class, ...
    (comp.lang.python)
  • Re: CPropertySheet/Page
    ... data structure Just went back and looked at my ... this common parent. ... where "CParent" stands for whatever your parent window is. ... are snatched out of the controls and stored in these variables, and in an OnSetActive, ...
    (microsoft.public.vc.mfc)
  • Re: polymorphism problem: common signatures with no common parent
    ... > pattern or trick I'm not seeing...but given that the base class does not ... You have a class AB with no foo methods, ... // Class containing common method names. ... class ConditionalConverterInstance: public ConditionalConverter { ...
    (comp.lang.cpp)
  • Re: Inheritance problem
    ... Say I am developing a search interface but I don't want the developers down ... I could potentially write all the controls on the ascx as derived controls ... I can manipulate the controls from my base class would make it so much ... mybaseclass inherits from system.web.ui.usercontrol ...
    (microsoft.public.dotnet.framework.aspnet)