Bullschmidt.com


     Home
     Web Database Concept
     How We Work Together
     Bio
     Web Database Sample
     Classic ASP Design Tips
     Bar Chart Tool
     Web Design Resources
     Access Database Sample

Classic ASP Design Tips
Included Configuration File
These are opinions of J. Paul Schmidt, MBA.
No warranties are either expressed or implied.
To Use Paul's Services: Paul@Bullschmidt.com

With a project to help reuse code there are often things that you'd like to have set in one place.  Thus if you ever need to change something like the title of the site or the version date it could be changed in only one page instead of having to make the change on every page of the site.

To do this perhaps create a file (called something like config.asp) to be included in each page.  It could contain things like this:
<%
mstrSiteTitle = "Bullschmidt.com"
mstrColorMain = "#FFFFFF"
mintSessionTimeoutMin = 60
mvarVersionDt = DateSerial(2018, 1, 1)
%>

And the following line would be located toward the top of most Web pages to include the config.asp file:
<!--#include file="config.asp"-->

And then on your Web pages you could use things from the config.asp file like this:
<% Session.Timeout = mintSessionTimeoutMin %>
<title>Bullschmidt.com - Classic ASP Design Tips</title>
<body bgcolor="#FFFFFF">
Design updated <%= FormatDateTime(mvarVersionDt, vbShortDate) %>

And the outputed HTML code would look like this:
<title>Bullschmidt.com - Classic ASP Design Tips</title>
<body bgcolor="#FFFFFF">
Design updated 1/1/2018

And the session timeout would be set at 60 minutes instead of whatever the server's default was set to.  And by the way if your site has an initial login page, you might just set the session timeout once on that page.





To Use Paul's Services:
Paul@Bullschmidt.com

Let's put some data on the Web!
Copyright © 2000-2018
J. Paul Schmidt, MBA
Freelance Web and Database Developer
All Rights Reserved

Privacy Policy