Click here to Skip to main content
15,895,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
While redirecting from a IHTTPHandler to some page, It throws a error.
Posted

1 solution

C#
public void ProcessRequest(HttpContext context)
    {
HttpResponse response = context.Response;
response.Redirect("abc.aspx"); 
}
 
Share this answer
 
Comments
Arul Prasad E 10-Feb-15 2:04am    
While using the above code also throws a error
navin ks 10-Feb-15 2:27am    
Whats error?
Arul Prasad E 10-Feb-15 3:26am    
Check my code

web.config:

<add name="SampleHandle" verb="*" path="*" type="TestHandler.SampleHandle, TestHandler">


void IHttpHandler.ProcessRequest(HttpContext context)
{
HttpResponse response = context.Response;
response.Redirect("~/Sample.aspx");

}
Arul Prasad E 10-Feb-15 2:10am    
This is my web.config
<add name="SampleHandle" verb="*" path="*" type="TestHandler.SampleHandle, TestHandler">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900