473,473 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Best Practice to write header

I don't like to code redundant information on every web page I write. For a
particular website, I want to code the following information at the top of
the page.

<html>
<head>
<title>My Title</title>
</head>
<body>

Of course this is simplified, I would like to pass in a title, and I would
like to be able to change this header and every page reflect it.

I'm coming from an asp background where I used header files constantly, but
I've heard that really isn't the way to go. Can anyone give me suggestions
on what they think is the best way to go about this?

Thanks,
--Michael
Nov 18 '05 #1
2 1314
User Control. But you will need 2.
One for header <html>
One for footer </html>

George.

"Michael" <raterus@localhost> wrote in message
news:ut****************@TK2MSFTNGP11.phx.gbl...
I don't like to code redundant information on every web page I write. For a particular website, I want to code the following information at the top of
the page.

<html>
<head>
<title>My Title</title>
</head>
<body>

Of course this is simplified, I would like to pass in a title, and I would
like to be able to change this header and every page reflect it.

I'm coming from an asp background where I used header files constantly, but I've heard that really isn't the way to go. Can anyone give me suggestions on what they think is the best way to go about this?

Thanks,
--Michael

Nov 18 '05 #2
If you were feeling adventurous you could extend the page class to declare
the header content as properties - take a look at some page template
tutorials on the web.

Joe
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
User Control. But you will need 2.
One for header <html>
One for footer </html>

George.

"Michael" <raterus@localhost> wrote in message
news:ut****************@TK2MSFTNGP11.phx.gbl...
I don't like to code redundant information on every web page I write. For
a
particular website, I want to code the following information at the top

of the page.

<html>
<head>
<title>My Title</title>
</head>
<body>

Of course this is simplified, I would like to pass in a title, and I would like to be able to change this header and every page reflect it.

I'm coming from an asp background where I used header files constantly,

but
I've heard that really isn't the way to go. Can anyone give me

suggestions
on what they think is the best way to go about this?

Thanks,
--Michael


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
4
by: Ned Balzer | last post by:
Hi all, I am pretty new to asp.net; I've done lots of classic asp, but am just beginning to get my mind wrapped around .net. What I'd like to do is include some code that tests if a user is...
7
by: Bill Pursell | last post by:
I read recently (can't remember if it was on this group or elsewhere) that it is a bad idea to write a header file this way: #ifndef FOO_HDR #define FOO_HDR 1 #include <stdio.h> int...
6
by: seb | last post by:
Hi, I am using pygtk for the first times. I am wondering what would be the best "pattern" to interface pygtk with a thread. The thread is collecting informations (over the network for...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.