Asp.net Response.Redirect Error

Posted by andrewWinn on Stack Overflow See other posts from Stack Overflow or by andrewWinn
Published on 2010-03-22T20:21:13Z Indexed on 2010/03/22 20:31 UTC
Read the original article Hit count: 548

Filed under:
|
|

My team and I are working on a portal applicaiton. When a user requests a page, we get a page object (contianing permissions, actual file to use and what not). We then do a Response.Redirect to "~/Default.aspx".

The crazy thing is that when the code to validate access and what not is called from a button click event from within an ajax update panel, response.redirect is pasting a "&f2" or a "/" into the url. So rather than http://localhost/Default.aspx, the webbrowser is being redirected to http://localhost/%f2Default.aspx, and is subsequently returning a 404 error.

HttpContext.Current.Response.Redirect("~/Default.aspx", false);

Anyone have an idea of why this would occur? And it only happens when the click event fires inside an update panel.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about response.redirect