HTML 要素の終了タグを HtmlTextWriter 出力ストリームに書き込みます。
Public Overridable Sub RenderEndTag()
[C#]
public virtual void RenderEndTag();
[C++]
public: virtual void RenderEndTag();
[JScript]
public function RenderEndTag();
解説
RenderBeginTag が呼び出された後、および HTML 要素の開始タグと終了タグの間にあるすべての内容が表示された後に、このメソッドを呼び出します。
使用例
[Visual Basic, C#, C++] RenderBeginTag の呼び出し、およびカスタム MyTag 要素の開始タグと終了タグの間にある HTML の内容を表示する Write の呼び出しの後に、 RenderEndTag メソッドを呼び出す例を次に示します。
' Create a non-standard tag.
writer.RenderBeginTag("Mytag")
writer.Write("Contents of MyTag")
writer.RenderEndTag()
writer.WriteLine()
[C#]
// Create a non-standard tag.
writer.RenderBeginTag("Mytag");
writer.Write("Contents of MyTag");
writer.RenderEndTag();
writer.WriteLine();
[C++]
// Create a non-standard tag.
writer->RenderBeginTag(S"Mytag");
writer->Write(S"Contents of MyTag");
writer->RenderEndTag();
writer->WriteLine();
[Visual Basic]
Public Overrides Sub RenderEndTag()
' Call the RenderEndTag method of the base class.
MyBase.RenderEndTag()
' If the element being rendered is a Label,
' call the PopEndTag method to write its closing tag.
If TagKey = HtmlTextWriterTag.Label Then
writer.Write(PopEndTag())
End If
End Sub 'RenderEndTag
End Class 'htwThree
[C#]
public override void RenderEndTag()
{
// Call the RenderEndTag method of the base class.
base.RenderEndTag();
// If the element being rendered is a <Label>,
// call the PopEndTag method to write its closing tag.
if(TagKey == HtmlTextWriterTag.Label)
{
writer.Write(PopEndTag());
}
}
[C++]
public:
void RenderEndTag() {
// Call the RenderEndTag method of the base class.
__super::RenderEndTag();
// If the element being rendered is a <Label>,
// call the PopEndTag method to write its closing tag.
if (TagKey == HtmlTextWriterTag::Label) {
writer->Write(PopEndTag());
}
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 2000, Windows XP Professional, Windows Server 2003 ファミリ
参照
HtmlTextWriter クラス | HtmlTextWriter メンバ | System.Web.UI 名前空間