Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

response redirect from .ashx file

Tags:

.net

ashx

I have ashx file and I want to redirect from ashx to aspx page. Some solution?

like image 583
Ballon Avatar asked Jan 12 '10 12:01

Ballon


People also ask

What is the use of response redirect?

The Response. Redirect method redirects a request to a new URL and specifies the new URL while the Server. Transfer method for the current request, terminates execution of the current page and starts execution of a new page using the specified URL path of the page.

Does response redirect stop execution?

When you use Response. Redirect("Default. aspx",true ) which is by default true then the execution of current page is terminated and code written after the Response. Redirect is not executed instead of executing code written after the Response.

What is Filehandler ASHX?

An ASHX file is a webpage that is part of an ASP.NET web server application. It contains references to other pages hosted on the web server that are sent to the user's web browser. ASHX files are processed by the server's ASP.NET HTTP Handler when a client web browser requests the page.


1 Answers

void ProcessRequest(HttpContext context)
{
     context.Response.Redirect(newUrl);
}
like image 194
Vitaliy Liptchinsky Avatar answered Oct 14 '22 19:10

Vitaliy Liptchinsky