As a website gets bigger it can become more difficult and time consuming to maintain. One way to help manage this is with the use of include files. Using includes will cut down on time by limiting the amount of code or html you will have to add to new pages or time spent updating existing pages.
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
Include files allow you to take pieces of redundant code or html and place them on a page by themselves. This is practical approach in keeping maintenance down to a minimum in a variety of ways. Below will give you an idea of what to use them for.
  1. Database Connections
  2. Menus
  3. Headers
  4. Footers
  5. Advertising Slots

These are just some of the scenarios in which an include file could be beneficial. All it takes is one line to include a file on a page. For example, we have a bunch of info  we want on all our pages that may need to change from time to time. First we will create a page named stuff.asp and put all that information on it. Now we put that in a directory we will call include. Now on every page where we want this information to be displayed we simply add this line:

<!-- #Include Virtual="include/stuff.asp" -->

By using Include Virtual as opposed to Include File, The server knows to look in the root of the web for the described path. If we use Include File then the server follows the path in the directory in which the page calling it is in. This would result in disaster as the file would not be there. The client would get a nasty little message in the browser instead of the page and you would wind up looking like you don't have a clue what you're doing.

That's it. Now when we want to edit this we just open stuff.asp, make the change and voila, all the pages on your web site are updated in no time!

Anytime you have a portion of your pages that is global in nature and subject to frequent changes or updates an include file would be a prudent way to address the situation.

The pages on this site all use includes. Both of the banners on this page are in separate includes. The footer at the bottom, and the entire menu to the left are includes as well. This allows me to make global changes by just editing one file.

Bad or missing query parameters in request.

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