HtmlTextWriter.InnerWriter プロパティ
アセンブリ: System.Web (system.web.dll 内)

Public Property InnerWriter As TextWriter
Dim instance As HtmlTextWriter Dim value As TextWriter value = instance.InnerWriter instance.InnerWriter = value
public TextWriter InnerWriter { get; set; }
public: property TextWriter^ InnerWriter { TextWriter^ get (); void set (TextWriter^ value); }
/** @property */ public TextWriter get_InnerWriter () /** @property */ public void set_InnerWriter (TextWriter value)
public function get InnerWriter () : TextWriter public function set InnerWriter (value : TextWriter)
内部マークアップの内容を書き込む TextWriter オブジェクト。

内部マークアップの内容とは、マークアップ言語の要素の開始タグと終了タグの間にあるテキストのことです。
InnerWriter プロパティが HttpWriter クラスのインスタンスである 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");

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHtmlTextWriter.InnerWriter プロパティを検索する場合は、下記のリンクをクリックしてください。

- HtmlTextWriter.InnerWriter プロパティのページへのリンク