Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi I have two pages default.aspx and view.aspx,
default.aspx has hyperlink control and on code behind file in page load event I have written this
C#
Hyperlink.NavigateUrl = "view.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.Url.AbsolutePath);


and on view.aspx I have 1 more hyperlink, I have written this on code behind file page load event
C#
BackHyperLink.NavigateUrl = HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);


when I click Back hyperlink i am getting this error
HTTP Error 400 - Bad Request.

Can anyone help me please.

Thanks
Posted
Updated 6-Mar-11 17:38pm
v3

1 solution

use this in view.aspx page,

BackHyperLink.NavigateUrl = Request.QueryString["ReturnUrl"];
 
Share this answer
 
Comments
ProgrammerAt 6-Mar-11 23:48pm    
Hi, it worked
thanks a lot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900