A header is used on many websites and in general is the same globally throughout the site. Now what happens when the header needs to be changed? Well, by using an include fie for the header this is a simple task.
Nuts Own Code

Asp Directory

Nuts Web Search
Web Directory
Web Search

Nuts ASP Code
Functions
Scripts
Tutorials
Wizards
Fonts
Download Fonts
Download Dll Files
Dll Files
Relaxing Games
Online Games
Take Our Poll
Do you use .Net?
Yes
No
Not Yet
Dot What?
Really, Take It!
Get The Source
About Nuts4Asp
Privacy
Contact Us
Arts
Movies, Television, Music
Business
Jobs, Industries, Investing
Computers
Internet, Software, Hardware
Games
Video Games, RPGs, Gambling
Health
Fitness, Medicine, Alternative
Home
Family, Consumers, Cooking
Kids and Teens
Arts, School Time, Teen Life
News
Media, Newspapers, Weather
Reference
Maps, Education, Libraries
Regional
US, Canada, UK, Europe
Science
Biology, Psychology, Physics
Sports
Baseball, Soccer, Basketball
World
Deutsch, Español, Français, Italiano, Japanese, Nederlands, Polska, Svenska
Help build the largest human-edited directory of the web
There are many reasons one might have redundant code in the headers of a web page. This will vary from certain meta tags to javascripts and even some advertising code. An easy way to maintain this is with an include file. For the purpose of this demonstration we will assume that there is a javascript used globally throughout the site that requires code in the head tags. 

To use an include in your head tags all you need to do is decide which code and or html is used in all of your pages and then put that in a page named head.htm. Place it in a directory specifically for your include files named perhaps, include. It may look something like this:

<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script language="JavaScript">
var blah
function blahblah() {
stuff.blah
}
</script>

Now place this in the head of your pages:

<head>
<!-- #Include Virtual="include/head.htm" -->
</head>

Now every time you wish to make a change to your head tags you only need to open one page instead of them all. Simply open head.htm and make your changes. All your pages are now updated.

More ways to use include files.

Bad or missing query parameters in request.

Copyright © 2001-2008 Nuts4Asp.com
All other names used are property or copyright of their respective owners.