Answers for "Response.Redirect cannot be called in a Page callback"

C#
0

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");
Posted by: Guest on September-30-2020

Code answers related to "Response.Redirect cannot be called in a Page callback"

C# Answers by Framework

Browse Popular Code Answers by Language