Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Response.Redirect cannot be called in a Page callback

// Butchered together from multiple answers

if (!Page.IsCallback)
    Request.Redirect("~/Error.aspx");
else
  HttpContext.Current.Response.RedirectLocation =
  			System.Web.VirtualPathUtility.ToAbsolute("~/Error.aspx");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #called #Page #callback
ADD COMMENT
Topic
Name
5+2 =