Wednesday, March 21, 2012

Passing a Querry string in a Response.Redirect?

I want to be able to redirect on a Button click event with a querry string attached with the username, is this possible?
would it look something like?
'Response.Redirect("link.aspx?UserId="Label.Text"") or
'Response.Redirect("link.aspx?userid=("Label.Text"))

This should do it:
Response.Redirect( "link.aspx?UserId=" & Server.UrlEncode(myLabel.Text) )

0 comments:

Post a Comment