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:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top