Codefixer - ASP tutorials, resources and software
ASP.NET 3.5/2.0 Hosting – Click Here
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Wednesday 14 May
MembersPro PayPal - ASP Membership software

asp.netPRO “Best ASP.NET Host” – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

Using Include files

Below are just two pieces of advice on using include files.

When I first set out building this site and indeed developing websites I was unaware of the benefits of server side include files.

If I wanted to change my logo, banners or copyright text amongst other things then it was a perilous job. I would have to run a find and replace on all the pages in my site. This took time and I was never sure that all the pages had been updated correctly. Once I realised that with using include files I could update and maintain the site alot quicker and easier then I switched and changed the code so that the whole site would function with virtual include files. I use this practice in every site I develop now.

In relation to this site the logo has it's own include file, the banner uses an include file, and the left and right navigation bars use numerous include files as well as the footer which houses the copyright and the bottom links.

When I decided to write my application 'MembersPro PayPal' I decided that customers who bought the application may want to move the database from the folder that it was currently in to a more secure folder on their webserver. To enable the customers to achieve this I created a separate file called 'sConnString.asp' and put it in the folder 'includes'. When the customer purchases the script and uploads all the files and folders onto their webserver they can then move the database to a more secure folder and can thus easily change the path to the database. All they have to do is go into the 'sConnString.asp' file and change the value of the variable sConnString to point to the new location of the database. So if there's 60 files that access the database using the connection variable 'sConnString' then all the pages in the application will have the new and correct value of 'sConnString'.

LinksPro - Directory  and Link  Management Software




ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software