Print Page | Close Window

-Question-

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=182
Printed Date: 28 March 2026 at 5:01pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: -Question-
Posted By: skyworld
Subject: -Question-
Date Posted: 14 February 2003 at 10:28pm

can some one please explain the case theory......

I want to have a lot of scripts on 1 page and have it like

link.asp?script=1

then if request.querrystring("script") = 1 then

......

 

would this work and is there a easier way around this ......




Replies:
Posted By: TYSON
Date Posted: 15 February 2003 at 3:41am

Your after something like this?
<%
Select Case Request.QueryString("Script")
 Case "1"   
  Response.write"Code Block 1"

 Case "2"
  Response.write"Code Block 2"

 Case "3"
  Response.write"Code Block 3"

 Case "4"
  Response.write"Code Block 4"

 Case Else
  'This is if a script has been requested that doesnt exist

End Select
%>

You could also do it using the Server.Execute("page_whatever.asp") command in conjunction with the above Case statement that will fire another page containing your asp script.



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: skyworld
Date Posted: 15 February 2003 at 12:04pm
YES that is thank you


Posted By: dolby71
Date Posted: 15 February 2003 at 5:04pm
You can also use ElseIf function....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net