Click here to Skip to main content
14,738,309 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
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
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.

Updated 6-Mar-11 18:38pm

1 solution

use this in view.aspx page,

BackHyperLink.NavigateUrl = Request.QueryString["ReturnUrl"];
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

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