HttpResponse::End Method
Sends all currently buffered output to the client, stops execution of the page, and raises the EndRequest event.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ThreadAbortException | The call to End has terminated the current request. |
Calls to the End, Redirect, and Transfer methods throw a ThreadAbortException exception when the current response ends prematurely.
The following example uses the IsClientConnected property to check whether the client that is requesting the page remains connected to the server. If IsClientConnected is true, the code calls the Redirect method, and the client will view another page. If IsClientConnected is false, then the code calls the End method and all page processing is terminated.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.