Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - -Question-
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

-Question-

 Post Reply Post Reply
Author
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Topic: -Question-
    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 ......

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
skyworld View Drop Down
Senior Member
Senior Member


Joined: 12 December 2002
Location: United States
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote skyworld Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2003 at 12:04pm
YES that is thank you
Back to Top
dolby71 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 October 2002
Location: Israel
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote dolby71 Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2003 at 5:04pm
You can also use ElseIf function....
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.