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
Loading
programmerAtPosted Mar 7, 2011, 1:14 AM
Krishna GaradPosted Mar 6, 2011, 11:39 PM
Welcome to Csharpcorner
Normally this error occur when we are trying to access the resource which is not available. In your case check out view.aspx location means see is it present in any directory.If it is then try like
Hyperlink.NavigateUrl = "~/view.aspx?ReturnUrl=" +
HttpUtility.UrlEncode(Request.Url.AbsolutePath);
As well your target url must be able to Decode.