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

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

HtmlTextWriter.InnerWriter プロパティ

マークアップ要素内部内容書き込むテキスト ライタ取得または設定します

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

Dim instance As HtmlTextWriter
Dim value As TextWriter

value = instance.InnerWriter

instance.InnerWriter = value
public TextWriter InnerWriter { get; set;
 }
/** @property */
public TextWriter get_InnerWriter ()

/** @property */
public void set_InnerWriter (TextWriter value)

プロパティ
内部マークアップ内容書き込む TextWriter オブジェクト

解説解説
使用例使用例

Render メソッドをオーバーラードする WebControl クラスから派生したカスタム Web サーバー コントロール使用する方法次のコード例示します。このコード例では、HtmlTextWriter クラス使用して<font> 要素書き込みます要素開始タグ書き込んだ後、InnerWriter プロパティ使用して文字列 "<br> The time on the server:"書き込み、この文字列と DateTime.Now プロパティの値を連結してます。

        ' Write the opening tag of a Font element.
        writer.WriteBeginTag("font")
        ' Write a Color style attribute to the opening tag
        ' of the Font element and set its value to red.
        writer.WriteAttribute("color", "red")
        ' Write the closing character for the opening tag of
        ' the Font element.
        writer.Write(">")

        ' Use the InnerWriter property to create a TextWriter
        ' object that will write the content found between
        ' the opening and closing tags of the Font element.
        ' Message is a string property of the control that 
        ' overrides the Render method.
        Dim innerTextWriter As TextWriter =
 writer.InnerWriter
        innerTextWriter.Write((Message + "<br> The time
 on the server :" & _
           System.DateTime.Now.ToLongTimeString()))

        ' Write the closing tag of the Font element.
        writer.WriteEndTag("font")
    End Sub 'Render
End Class 'FirstControl 
    // Write the opening tag of a Font element.
    writer.WriteBeginTag("font");
    // Write a Color style attribute to the opening tag
    // of the Font element and set its value to red.
    writer.WriteAttribute("color", "red");
    // Write the closing character for the opening tag of
    // the Font element.
    writer.Write('>');

    // Use the InnerWriter property to create a TextWriter
    // object that will write the content found between
    // the opening and closing tags of the Font element.
    // Message is a string property of the control that 
    // overrides the Render method.
    TextWriter innerTextWriter = writer.InnerWriter;
    innerTextWriter.Write(Message + "<br> The time on the server :"
 + System.DateTime.Now.ToLongTimeString());

    // Write the closing tag of the Font element.
    writer.WriteEndTag("font");
}
   // Write the opening tag of a Font element.
   writer->WriteBeginTag( "font" );
   
   // Write a Color style attribute to the opening tag
   // of the Font element and set its value to red.
   writer->WriteAttribute( "color", "red" );
   
   // Write the closing character for the opening tag of
   // the Font element.
   writer->Write( '>' );
   
   // Use the InnerWriter property to create a TextWriter
   // object that will write the content found between
   // the opening and closing tags of the Font element.
   // Message is a string property of the control that
   // overrides the Render method.
   TextWriter^ innerTextWriter = writer->InnerWriter;
   innerTextWriter->Write( String::Concat( Message, "<br> The time
 on the server : ", System::DateTime::Now.ToLongTimeString() ) );
   
   // Write the closing tag of the Font element.
   writer->WriteEndTag( "font" );
}

// Write the opening tag of a Font element.
writer.WriteBeginTag("font");

// Write a Color style attribute to the opening tag
// of the Font element and set its value to red.
writer.WriteAttribute("color", "red");

// Write the closing character for the opening tag of
// the Font element.
writer.Write('>');

// Use the InnerWriter property to create a TextWriter
// object that will write the content found between
// the opening and closing tags of the Font element.
// Message is a string property of the control that 
// overrides the Render method.
TextWriter innerTextWriter = writer.get_InnerWriter();

innerTextWriter.Write(get_Message() + "<br> The time on the server :"
 
    + System.DateTime.get_Now().ToLongTimeString());

// Write the closing tag of the Font element.
writer.WriteEndTag("font");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlTextWriter クラス
HtmlTextWriter メンバ
System.Web.UI 名前空間
TextWriter
HttpWriter
WebControl


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



HtmlTextWriter.InnerWriter プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS