ASP.NET > Web > HttpResponse > IsClientConnected
The IsClientConnected property is a read-only property that indicates if the client has reset the connection to the server.
This property enables you greater control over circumstances where the client may have reset the connection to the server. For example, if a long period of time has elapsed between when a client request was made and when the server responded, it may be beneficial to make sure the client is still connected before continuing with something.
Example
If Not Response.IsClientConnected Then
Response.Redirect("login.aspx")
End if