Export (0) Print
Expand All

HttpResponse.End Method

Sends all currently buffered output to the client, stops execution of the page, and raises the Application_EndRequest event.

[Visual Basic]
Public Sub End()
[C#]
public void End();
[C++]
public: void End();
[JScript]
public function End();

Exceptions

Exception Type Condition
ThreadAbortException The call to End has terminated the current request.

Remarks

Calls to End, Redirect, and Transfer raise a ThreadAbortException when the current response ends prematurely.

Example

The following example simply closes a connection.

[Visual Basic] 
Response.End()
   

[C#] 
Response.End();
   

[C++] 
Response->End();
   

[JScript] 
Response.End()
   

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpResponse Class | HttpResponse Members | System.Web Namespace

Show:
© 2015 Microsoft