Querystring not working

  • Thread starter Thread starter JJ297
  • Start date Start date
J

JJ297

Could someone take a look at this code and tell me if this code is
valid?

Thanks!


If Request.QueryString("quesid") <> "" Then
Response.Redirect("CDPadmineditpage.aspx?quesid = """)
End If
 
Valid, yes, but depends on what you're wanting to do.

If you're wanting to take the result of your QueryString and redirect based
on that ID, you need to assign it as such:

If Request.QueryString("quesid") <> "" Then
Response.Redirect("CDPadmineditpage.aspx?quesid=" + Request.QueryString("quesid"))
End If

Now, if you're wanting to "blank out" the query string, you could just pass

Response.Redirect("CDPadmineditpage.aspx?quesid=")

HTH.

-dl
 
Valid, yes, but depends on what you're wanting to do.

If you're wanting to take the result of your QueryString and redirect based
on that ID, you need to assign it as such:

If Request.QueryString("quesid") <> "" Then
Response.Redirect("CDPadmineditpage.aspx?quesid=" + Request.QueryString("quesid"))
End If

Now, if you're wanting to "blank out" the query string, you could just pass

Response.Redirect("CDPadmineditpage.aspx?quesid=")

HTH.

-dl

--
David R. Longneckerhttp://blog.tiredstudent.com




- Show quoted text -

Thanks, I wanted the result of the querystring and to redirect that ID
so I used your code:
 
Back
Top