Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 21st, 2004, 10:46 AM
Authorized User
 
Join Date: Oct 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default menu system using include files

I`m wanting a simple menu system at the top of every page. I was going to use include files.

My question is : depending what page i`m visiting i want to bold the associated hyperlink text in the menu. Current thinking is :

i) use querystring to keep track of current menu in use.
ii) session id to keep track of current menu in use.

what other methods should i consider? is there an easier way of achieving this?

cheers



 
Old October 21st, 2004, 12:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You can access the current page being accessed using Request.ServerVariables("SCRIPT_NAME"), which based on the page, bolds certain features.

Brian
 
Old October 21st, 2004, 12:10 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can use Querystring to keep that simpler. Though using Session based solution is not a bad Idea.

I could think yet another way of doing this. If the menu items are restricted to corresponding page always, then you may use SERVER variables to get the FileName that the menu links to and compare the filename that corresponds to the menu item and BOLD that Menu ITEM. This way, you won't be showing anything extra along with the URL, like that used in a QueryString based solution.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
include files b00gieman Classic ASP Basics 2 September 15th, 2007 10:22 AM
Include files tarang SQL Server 2000 1 July 18th, 2007 03:32 AM
Include Files jmss66 Classic ASP Basics 16 June 9th, 2004 10:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.