Reply
ASP Includes with Query Sting
Old 06-20-2005, 12:19 PM ASP Includes with Query Sting
FFWalrus's Avatar
Junior Talker

Posts: 2
Basically I want to use a query string to determine which template is loaded.

Currently there are only two options, default (null or 0) and ireland(1). In the future we would like to add more to this, so I want to leave room for expansion.

Currently this is what I have, but it doesn't work.

<%
RegID = Request.QueryString("RegID")
if RegID = 1 then
%>
<!--#include virtual="/template/template_top_ireland.asp"-->
<%
else
%>
<!--#include virtual="/template/template_top.asp"-->
<%

end if
%>
FFWalrus is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-20-2005, 01:39 PM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Remember that Include files are processed before the ASP Script - so read through your code as if the include lines had already been replaced by the code and see if it still mkes sense.

It may be that you've declared the same variable in each include file...
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 06-20-2005, 03:25 PM Ok, Now what...
FFWalrus's Avatar
Junior Talker

Posts: 2
Yes, both my includes are almost identical, containing many of the same variables. They do not however set any variables or controls for the rest of the site. So I guess that means I can't use includes in this way. So my next question is there perhaps a better way to do it? The files I was including basically setup the tables that the page is laid-out in, and specify what style sheet to use.
FFWalrus is offline
Reply With Quote
View Public Profile
 
Old 06-21-2005, 12:08 PM
ExpressoDan's Avatar
Ultra Talker

Posts: 317
Name: This Space for Rent
Location: Georgia
Check out chrishirst post on this thread:
http://webmaster-talk.com/showthread.php?t=30841

D
ExpressoDan is offline
Reply With Quote
View Public Profile Visit ExpressoDan's homepage!
 
Reply     « Reply to ASP Includes with Query Sting
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.96736 seconds with 12 queries