programmerAt

programmerAt

  • NA
  • 3
  • 5.1k

Getting error HTTP Error 400 - Bad Request when usiing hyperlink with query string

Mar 6 2011 11:09 PM
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 plz.

Thanks


Answers (2)