This documentation is archived and is not being maintained.
HtmlTextWriter.PushEndTag Method
.NET Framework 1.1
Saves the specifed HTML element for a later call to the PopEndTag method.
[Visual Basic] Protected Sub PushEndTag( _ ByVal endTag As String _ ) [C#] protected void PushEndTag( string endTag ); [C++] protected: void PushEndTag( String* endTag ); [JScript] protected function PushEndTag( endTag : String );
Parameters
- endTag
- The closing tag of the HTML element.
Example
[Visual Basic] ' The endTag variable must be declared as a string ' in the class variable. Use the TagLeftChar, ' SlashChar, and TagRightChar fields and ' the GetTagName method to assign a value to ' the endTag variable. endTag = TagLeftChar & SlashChar & GetTagName(HtmlTextWriterTag.Font) & TagRightChar ' Use the PushEndTag method to write the custom ' endTag string value as its parameter. PushEndTag(endTag) End If [C#] // The endTag variable must be declared as a string // in the class variable. Use the TagLeftChar, // SlashChar, and TagRightChar fields and the // GetTagName method to assign a value to the // endTag variable. endTag = TagLeftChar + SlashChar + GetTagName(HtmlTextWriterTag.Font) + TagRightChar; // Use the PushEndTag method to write the custom // endTag string value as its parameter. PushEndTag(endTag); [C++] // The endTag variable must be declared as a String* in the class // variable for this assignment to work. Use the // TagLeftChar, SlashChar, and TagRightChar fields and the // GetTagName method to assign a value to the endTag variable. endTag = String::Concat( __box(TagLeftChar), __box(SlashChar), GetTagName(HtmlTextWriterTag::Font), __box(TagRightChar)); // Use the PushEndTag method to write the custom // endTag String* value as its parameter. PushEndTag(endTag);
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
HtmlTextWriter Class | HtmlTextWriter Members | System.Web.UI Namespace
Show: