Request.QueryString Error, statement cannot be a declaration or labeled - Help

Discussion in 'C#' started by The_Hatta, May 2, 2011.

  1. #1
    "CS1023: Embedded statement cannot be a declaration or labeled statement"
    is what my current error is :/
    and it dosn't make any sense to me, can somebody please help :)

    heres the code i've added

    
    <% if (Request.QueryString["id"] = "2") then %>
     Response.WriteFile ("2.htm")
    <% elseif (Request.QueryString["id"] = "1") then %>
     Response.WriteFile ("1.htm")
    <% end if %>
    
    Code (markup):
    Please Help :)
     
    The_Hatta, May 2, 2011 IP
  2. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Request.QueryString["id"]
    to:Request.QueryString("id")

    Round brackets with ASP
     
    camjohnson95, May 16, 2011 IP