Simple if else

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaveRook
    New Member
    • Jul 2007
    • 147

    Simple if else

    It's late on a friday afternoon, so sorry if this is a stupid question, but I'm having so many problems with this if else statement that I've tried to simplify it more so and it still won't work. Why does the page not forward? What is wrong with the if else statement. The repsonse.Write returns the values of the variables!

    Code:
    <%
    srIDC1="p" 
    srIDC2="p"
    
    Response.Write("<br />Strain1: " &srIDC1&"<br /> Strain2: "&srIDC2) 
    
    if srIDC1="p" & srIDC2="p" then
    	Response.Redirect("new.asp")
    end if%>
    I'm hoping i've not overlooked something obvious!

    Dave
  • DaveRook
    New Member
    • Jul 2007
    • 147

    #2
    D'OH!!

    Going back and forth between c# and vbscript!!!

    I can't use & I have to use AND for vbscript! Was on this for about 40 minutes!

    Sorry

    Dave

    Comment

    Working...