zhshqzyc
asked on
Redirect page and pass the string to that page as well.
I want to redirect a page and also pass a string to that web page as well.
Thanks for the advice.
Thanks for the advice.
Response.Redirect("~/admin/test.aspx?UserName=" + Server.UrlEncode(UserName), false);
Response.Redirect("~/admin/test.aspx");
Is it correct?
Line 1 looks fine to me. This will redirect you to the appropriate page and append the querystring appropriately.
ASKER
But if there is only line 1, it doesn't jump the new page because of "false". If set "true" I will get an exception.
Use server.transfer... Its a better option much of the time. See below:
http://arplis.com/difference-between-server-transfer-and-response-redirect/
http://arplis.com/difference-between-server-transfer-and-response-redirect/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.