View Single Post
  #1 (permalink)  
Old March 6th, 2006, 10:49 AM
crmpicco crmpicco is offline
Friend of Wrox
Points: 8,019, Level: 38
Points: 8,019, Level: 38 Points: 8,019, Level: 38 Points: 8,019, Level: 38
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2005
Location: Mauchline, East Ayrshire, Scotland
Posts: 1,525
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to crmpicco Send a message via AIM to crmpicco Send a message via MSN to crmpicco Send a message via Yahoo to crmpicco
Default if and then without end ifs in Classic ASP

Code:
    <%
    sURL = Request.ServerVariables("URL")

    if InStrB(sURL, "net1.asp") then response.Write "<img src=""images/rules.gif"" />"
    elseif InStrB(sURL, "cancel.asp") then response.Write "<img src=""images/rules.gif"" />"
    elseif InStrB(sURL, "net2.asp") then response.Write "<img src=""images/rules_grey.jpg"" />"
    elseif InStrB(sURL, "net3.asp") then response.Write "<img src=""images/rules_grey.jpg"" />"
    else response.Write "<img src=""images/rules.gif"" />"
    %>
Is there a quicker way of coding these lines? I just cant see it ATM.

Picco


www.crmpicco.co.uk
__________________
_______________________
Ayrshire Minis - a Mini E-Community
http://www.ayrshireminis.com
http://www.crmpicco.co.uk
Reply With Quote