HttpResponse.End メソッドとは? わかりやすく解説

HttpResponse.End メソッド

現在バッファリングされているすべての出力クライアント送信しページ実行停止して、EndRequest イベント発生させます

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

例外例外
解説解説

EndRedirect、および Transfer呼び出したとき、現在の応答途中で終了すると、ThreadAbortException が生成されます。

使用例使用例

次のコード例では、IsClientConnected プロパティ使用してページ要求しているクライアントサーバーにまだ接続されているかどうか確認しますIsClientConnectedtrue場合Redirect メソッド呼び出されクライアント別のページ表示されます。IsClientConnectedfalse場合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>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からHttpResponse.End メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHttpResponse.End メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHttpResponse.End メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HttpResponse.End メソッドのお隣キーワード
検索ランキング

   

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



HttpResponse.End メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS