HttpResponse.IsClientConnected プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HttpResponse.IsClientConnected プロパティの意味・解説 

HttpResponse.IsClientConnected プロパティ

クライアントがサーバーにまだ接続されているかどうかを示す値を取得します。

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As HttpResponse
Dim value As Boolean

value = instance.IsClientConnected
public bool IsClientConnected { get;
 }
public:
property bool IsClientConnected {
    bool get ();
}
/** @property */
public boolean get_IsClientConnected ()
public function get IsClientConnected
 () : boolean

プロパティ値
クライアントが現在接続されている場合は true。それ以外の場合は false。

使用例使用例

次のコード例では、IsClientConnected プロパティを使用して、ページを要求しているクライアントがサーバーにまだ接続されているかどうかを確認します。IsClientConnected が true の場合、Redirect メソッドが呼び出され、クライアントに別のページが表示されます。IsClientConnected が false の場合、End メソッドが呼び出され、すべてのページの処理が終了します。

<%@ Page Language="VB" %>
<script runat="server">
    Private Sub Page_Load(sender As
 Object, e As EventArgs)

        ' Check whether the browser remains
        ' connected to the server.
        If (Response.IsClientConnected) Then

            ' If still connected, redirect
            ' to another page.             
            Response.Redirect("Page2VB.aspx", false)
        Else
            ' If the browser is not connected
            ' stop all response processing.
            Response.End()
        End If
    End Sub
</script>
<html>
<head>
</head>
<body>
    <form runat="server">
    </form>
</body>
</html>
<%@ Page Language="C#" %>
<script runat="server">

    private void Page_Load(object sender, EventArgs
 e)
    {
        // Check whether the browser remains
        // connected to the server.
        if (Response.IsClientConnected)
        {
            // If still connected, redirect
            // to another page. 
            Response.Redirect("Page2CS.aspx", false);
        }
        else
        {
            // If the browser is not connected
            // stop all response processing.
            Response.End();
        }
    }

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
    </form>
</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

HttpResponse.IsClientConnected プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HttpResponse.IsClientConnected プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS