0

I've to redirect to the controller action method from non-controller class.

I am using HttpContext.Current.Response.Redirect();, it is redirecting me to my action method, but it's throwing an error

"Cannot redirect after HTTP headers have been sent".

public void MethodName ()
{    
 HttpContext.Current.Response.Redirect(url);
}

I want to redirect form non-controller class void method.

Divyang Desai
  • 7,483
  • 13
  • 50
  • 76
Parita
  • 57
  • 6

0 Answers0