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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Html32TextWriter.RenderAfterContent メソッドの意味・解説 

Html32TextWriter.RenderAfterContent メソッド

HTML 要素内容の後にテキストまたは空白文字書き込みます

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

使用例使用例

RenderAfterContent メソッドオーバーライドする方法次のコード例示しますオーバーライドされた各メソッドは、現在レンダリングしているのが th 要素であるかどうか最初に確認し次に、SupportsBold メソッド使用して要求元のデバイス太字表示できるかどうか確認しますデバイス太字サポートしている場合RenderAfterContent メソッドb 要素終了タグ書き込みますデバイス太字サポートしてない場合RenderAfterContent メソッドfont 要素終了タグ書き込みます

次に、現在レンダリングしているのが h4 要素であるかどうか確認され、SupportsItalic プロパティ使用して要求元のデバイス斜体表示できるかどうか確認されます。デバイス斜体サポートしている場合RenderAfterContent メソッドi 要素終了タグ書き込みますデバイス斜体サポートしてない場合RenderAfterContent メソッドfont 要素終了タグ書き込みます

このコード例は、Html32TextWriter クラストピック取り上げているコード例一部分です。

' Override the RenderAfterContent method to close
' styles opened during the call to the RenderBeforeContent
' method.
Protected Overrides Function
 RenderAfterContent() As String

    ' Check whether the element being rendered is a <th> element.
    ' If so, and the requesting device supports bold formatting,
    ' render the closing tag of the <b> element. If not,
    ' render the closing tag of the <font> element.
    If TagKey = HtmlTextWriterTag.Th Then
        If SupportsBold Then
            Return "</b>"
        Else
            Return "</font>"
        End If
    End If

    ' Check whether the element being rendered is an <H4>.
    ' element. If so, and the requesting device supports italic
    ' formatting, render the closing tag of the <i> element.
    ' If not, render the closing tag of the <font> element.
    If TagKey = HtmlTextWriterTag.H4 Then
        If (SupportsItalic) Then
            Return "</i>"
        Else
            Return "</font>"
        End If
    End If
    ' Call the base method.
    Return MyBase.RenderAfterContent()
End Function
// Override the RenderAfterContent method to close
// styles opened during the call to the RenderBeforeContent
// method.
protected override string RenderAfterContent()
{
    // Check whether the element being rendered is a <th> element.
    // If so, and the requesting device supports bold formatting,
    // render the closing tag of the <b> element. If not,
    // render the closing tag of the <font> element.
    if (TagKey == HtmlTextWriterTag.Th)
    {
        if (SupportsBold)
            return "</b>";
        else
            return "</font>";
    }

    // Check whether the element being rendered is an <H4>.
    // element. If so, and the requesting device supports italic
    // formatting, render the closing tag of the <i> element.
    // If not, render the closing tag of the <font> element.
    if (TagKey == HtmlTextWriterTag.H4)
    {
        if (SupportsItalic)
            return "</i>";
        else
            return "</font>";
    }
    // Call the base method
    return base.RenderAfterContent();
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Html32TextWriter クラス
Html32TextWriter メンバ
System.Web.UI 名前空間
RenderBeforeContent


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS