I have ashx file and I want to redirect from ashx to aspx page. Some solution?
Asked
Active
Viewed 2.0k times
3 Answers
24
void ProcessRequest(HttpContext context)
{
context.Response.Redirect(newUrl);
}

Vitaliy Liptchinsky
- 5,221
- 2
- 18
- 25
-2
I found a solution and it should work fine:
context.Response.ContentType = "text/plain";
if (controlcase)
{
//Write code, what you want...
context.Response.Write("This is result");
}
else
{
context.Response.Write("<script>location.href='url you want to redirect'</script>");
}