Basic Web Design Quesion

J

JJ

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??
 
J

Jason Coyne

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.
 
J

JJ

Thanks. Unfortunately I'm using .net 1.1 . (at least for now) so if there's
any way of doing it with this then please let me know
 
J

JJ

Thanks Jason. Hmmmm I'm in two minds now whether to wait until I order VS
2005 or continue with inheriting a base class...
 
C

clintonG

ASP.NET 1.1 Master Pages, Themes and Skins using your own templates and
providers or some solution others have documented assuming you could
understand their logic and cope with what may then be discovered to not be
as ideal as the getting over the little boo-boo by upgrading to 2.0 and
having it all handed to you right out of the framework all nice and neat
(more or less).

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 
J

JJ

Just out of interest, whats the significant differenct between Visual Web
Express 2005 and the professional version when it comes to asp.net (using
vb) development and page design?

The thought of being able to potentially do all my work in VS as opposed to
swapping and changing with dreamweaver is a big bonus.
 
C

clintonG

I've been using Visual Studio and utilize less than half of its Enterprise
capabilities so AFIK the most significant difference in this context is the
presence of wizards and code generators. Depending on the scope of one's
work, it also depends on how much a person needs to depend on wizards and
generator to remain productive. After that question is resolved it becomes
IMO a simple matter of fundamental competencies.

When tables were the dominant element for page design a tool like HomeSite
included a table generator (which I still use in conjunction with Visual
Studio 2005) and that table generator was for some time a priceless
feature. Once generated however, when using HomeSite a developer has to
modify tables by hand as HomeSite can not dynamically edit what it has
generated. When Dreamweaver/FrontPage came along and made it possible to
dynamically edit generated HTML productivity increased. However, dynamic
table generation and editing seems to be a commodity in all web
design/development tools developed by the major vendors these days. So IMO
they are all fundamentally the same. Even more considerable is the fact that
nobody's tools automate or generate markup styled with CSS in the same way
tables have been and can be dynamically generated and maintained.

So we're right back to square one and the question of one's competency with
page layout vs one's dependency on page layout generators as the quest for
productivity in the tools has shifted from page layout to development and
generation of the "code behind." In that regard the name of the game is
currently Visual Studio 2005 followed by the Express line of applications
noting Microsoft also has new tools that are taking this paradigm even
further [1].

<%= Clinton Gallagher

[1] http://www.microsoft.com/products/expression/en/default.mspx
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top