Export (0) Print
Expand All

Html32TextWriter Class

Writes a series of HTML 3.2–specific characters and text to the output stream for an ASP.NET server control. The Html32TextWriter class provides formatting capabilities that ASP.NET server controls use when rendering HTML 3.2 content to clients.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public class Html32TextWriter : HtmlTextWriter

The Html32TextWriter type exposes the following members.

  NameDescription
Public methodHtml32TextWriter(TextWriter)Initializes a new instance of the Html32TextWriter class that uses the line indentation that is specified in the HtmlTextWriter.DefaultTabString field when the requesting browser requires line indentation.
Public methodHtml32TextWriter(TextWriter, String)Initializes a new instance of the Html32TextWriter class that uses the specified line indentation.
Top

  NameDescription
Public propertyEncodingGets the encoding that the HtmlTextWriter object uses to write content to the page. (Inherited from HtmlTextWriter.)
Protected propertyFontStackInfrastructure. Gets a collection of font information for the HTML to render.
Public propertyFormatProviderGets an object that controls formatting. (Inherited from TextWriter.)
Public propertyIndentGets or sets the number of tab positions to indent the beginning of each line of markup. (Inherited from HtmlTextWriter.)
Public propertyInnerWriterGets or sets the text writer that writes the inner content of the markup element. (Inherited from HtmlTextWriter.)
Public propertyNewLineGets or sets the line terminator string used by the HtmlTextWriter object. (Inherited from HtmlTextWriter.)
Public propertyShouldPerformDivTableSubstitutionGets or sets a Boolean value indicating whether to replace a Table element with a Div element to reduce the time that it takes to render a block of HTML.
Public propertySupportsBoldGets or sets a Boolean value indicating whether the requesting device supports bold HTML text. Use the SupportsBold property to conditionally render bold text to the Html32TextWriter output stream.
Public propertySupportsItalicGets or sets a Boolean value indicating whether the requesting device supports italic HTML text. Use the SupportsItalic property to conditionally render italicized text to the Html32TextWriter output stream.
Protected propertyTagKeyGets or sets the HtmlTextWriterTag value for the specified markup element. (Inherited from HtmlTextWriter.)
Protected propertyTagNameGets or sets the tag name of the markup element being rendered. (Inherited from HtmlTextWriter.)
Top

  NameDescription
Public methodAddAttribute(HtmlTextWriterAttribute, String)Adds the markup attribute and the attribute value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodAddAttribute(String, String)Adds the specified markup attribute and value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodAddAttribute(HtmlTextWriterAttribute, String, Boolean)Adds the markup attribute and the attribute value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method, with optional encoding. (Inherited from HtmlTextWriter.)
Public methodAddAttribute(String, String, Boolean)Adds the specified markup attribute and value to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method, with optional encoding. (Inherited from HtmlTextWriter.)
Protected methodAddAttribute(String, String, HtmlTextWriterAttribute)Adds the specified markup attribute and value, along with an HtmlTextWriterAttribute enumeration value, to the opening tag of the element that the HtmlTextWriter object creates with a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodAddStyleAttribute(HtmlTextWriterStyle, String)Adds the markup style attribute associated with the specified HtmlTextWriterStyle value and the attribute value to the opening markup tag created by a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodAddStyleAttribute(String, String)Adds the specified markup style attribute and the attribute value to the opening markup tag created by a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Protected methodAddStyleAttribute(String, String, HtmlTextWriterStyle)Adds the specified markup style attribute and the attribute value, along with an HtmlTextWriterStyle enumeration value, to the opening markup tag created by a subsequent call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodBeginRenderNotifies an HtmlTextWriter object, or an object of a derived class, that a control is about to be rendered. (Inherited from HtmlTextWriter.)
Public methodCloseCloses the HtmlTextWriter object and releases any system resources associated with it. (Inherited from HtmlTextWriter.)
Public methodCreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public methodDispose()Releases all resources used by the TextWriter object. (Inherited from TextWriter.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources. (Inherited from TextWriter.)
Protected methodEncodeAttributeValue(HtmlTextWriterAttribute, String)Encodes the value of the specified markup attribute based on the requirements of the HttpRequest object of the current context. (Inherited from HtmlTextWriter.)
Protected methodEncodeAttributeValue(String, Boolean)Encodes the value of the specified markup attribute based on the requirements of the HttpRequest object of the current context. (Inherited from HtmlTextWriter.)
Protected methodEncodeUrlPerforms minimal URL encoding by converting spaces in the specified URL to the string "%20". (Inherited from HtmlTextWriter.)
Public methodEndRenderNotifies an HtmlTextWriter object, or an object of a derived class, that a control has finished rendering. You can use this method to close any markup elements opened in the BeginRender method. (Inherited from HtmlTextWriter.)
Public methodEnterStyle(Style)Writes the opening tag of a <span> element that contains attributes that implement the layout and character formatting of the specified style. (Inherited from HtmlTextWriter.)
Public methodEnterStyle(Style, HtmlTextWriterTag)Writes the opening tag of a markup element that contains attributes that implement the layout and character formatting of the specified style. (Inherited from HtmlTextWriter.)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExitStyle(Style)Writes the closing tag of a <span> element to end the specified layout and character formatting. (Inherited from HtmlTextWriter.)
Public methodExitStyle(Style, HtmlTextWriterTag)Writes the closing tag of the specified markup element to end the specified layout and character formatting. (Inherited from HtmlTextWriter.)
Protected methodFilterAttributesRemoves all the markup and style attributes on all properties of the page or Web server control. (Inherited from HtmlTextWriter.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodFlushClears all buffers for the current HtmlTextWriter object and causes any buffered data to be written to the output stream. (Inherited from HtmlTextWriter.)
Public methodFlushAsyncAsynchronously clears all buffers for the current writer and causes any buffered data to be written to the underlying device. (Inherited from TextWriter.)
Protected methodGetAttributeKeyObtains the corresponding HtmlTextWriterAttribute enumeration value for the specified attribute. (Inherited from HtmlTextWriter.)
Protected methodGetAttributeNameObtains the name of the markup attribute associated with the specified HtmlTextWriterAttribute value. (Inherited from HtmlTextWriter.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodGetStyleKeyObtains the HtmlTextWriterStyle enumeration value for the specified style. (Inherited from HtmlTextWriter.)
Protected methodGetStyleNameObtains the markup style attribute name associated with the specified HtmlTextWriterStyle enumeration value. (Inherited from HtmlTextWriter.)
Protected methodGetTagKeyObtains the HtmlTextWriterTag enumeration value associated with the specified markup element. (Inherited from HtmlTextWriter.)
Protected methodGetTagNameReturns the HTML element that is associated with the specified HtmlTextWriterTag enumeration value. (Overrides HtmlTextWriter.GetTagName(HtmlTextWriterTag).)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected methodIsAttributeDefined(HtmlTextWriterAttribute)Determines whether the specified markup attribute and its value are rendered during the next call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Protected methodIsAttributeDefined(HtmlTextWriterAttribute, String)Determines whether the specified markup attribute and its value are rendered during the next call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Protected methodIsStyleAttributeDefined(HtmlTextWriterStyle)Determines whether the specified markup style attribute is rendered during the next call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Protected methodIsStyleAttributeDefined(HtmlTextWriterStyle, String)Determines whether the specified markup style attribute and its value are rendered during the next call to the RenderBeginTag method. (Inherited from HtmlTextWriter.)
Public methodIsValidFormAttributeChecks an attribute to ensure that it can be rendered in the opening tag of a <form> markup element. (Inherited from HtmlTextWriter.)
Protected methodMemberwiseClone()Creates a shallow copy of the current Object. (Inherited from Object.)
Protected methodMemberwiseClone(Boolean)Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Protected methodOnAttributeRenderDetermines whether the specified markup attribute and its value can be rendered to the current markup element. (Inherited from HtmlTextWriter.)
Protected methodOnStyleAttributeRenderDetermines whether to write the specified HTML style attribute and its value to the output stream. (Overrides HtmlTextWriter.OnStyleAttributeRender(String, String, HtmlTextWriterStyle).)
Protected methodOnTagRenderDetermines whether to write the specified HTML element to the output stream. (Overrides HtmlTextWriter.OnTagRender(String, HtmlTextWriterTag).)
Protected methodOutputTabsWrites a series of tab strings that represent the indentation level for a line of markup characters. (Inherited from HtmlTextWriter.)
Protected methodPopEndTagRemoves the most recently saved markup element from the list of rendered elements. (Inherited from HtmlTextWriter.)
Protected methodPushEndTagSaves the specified markup element for later use when generating the end tag for a markup element. (Inherited from HtmlTextWriter.)
Protected methodRenderAfterContentWrites any text or spacing that appears after the content of the HTML element. (Overrides HtmlTextWriter.RenderAfterContent().)
Protected methodRenderAfterTagWrites any spacing or text that occurs after an HTML element's closing tag. (Overrides HtmlTextWriter.RenderAfterTag().)
Protected methodRenderBeforeContentWrites any tab spacing or font information that appears before the content that is contained in an HTML element. (Overrides HtmlTextWriter.RenderBeforeContent().)
Protected methodRenderBeforeTagWrites any text or tab spacing that occurs before the opening tag of an HTML element to the HTML 3.2 output stream. (Overrides HtmlTextWriter.RenderBeforeTag().)
Public methodRenderBeginTag(HtmlTextWriterTag)Writes the opening tag of the specified element to the HTML 3.2 output stream. (Overrides HtmlTextWriter.RenderBeginTag(HtmlTextWriterTag).)
Public methodRenderBeginTag(String)Writes the opening tag of the specified markup element to the output stream. (Inherited from HtmlTextWriter.)
Public methodRenderEndTagWrites the end tag of an HTML element to the Html32TextWriter output stream, along with any font information that is associated with the element. (Overrides HtmlTextWriter.RenderEndTag().)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWrite(Boolean)Writes the text representation of a Boolean value to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Char)Writes the text representation of a Unicode character to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Char[])Writes the text representation of an array of Unicode characters to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Decimal)Writes the text representation of a decimal value to the text string or stream. (Inherited from TextWriter.)
Public methodWrite(Double)Writes the text representation of a double-precision floating-point number to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Int32)Writes the text representation of a 32-byte signed integer to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Int64)Writes the text representation of a 64-byte signed integer to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Object)Writes the text representation of an object to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(Single)Writes the text representation of a single-precision floating-point number to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(String)Writes the specified string to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(UInt32)Writes the text representation of a 4-byte unsigned integer to the text string or stream. (Inherited from TextWriter.)
Public methodWrite(UInt64)Writes the text representation of an 8-byte unsigned integer to the text string or stream. (Inherited from TextWriter.)
Public methodWrite(String, Object)Writes a tab string and a formatted string to the output stream, using the same semantics as the String.Format method, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(String, Object[])Writes a formatted string that contains the text representation of an object array to the output stream, along with any pending tab spacing. This method uses the same semantics as the String.Format method. (Inherited from HtmlTextWriter.)
Public methodWrite(Char[], Int32, Int32)Writes the text representation of a subarray of Unicode characters to the output stream, along with any pending tab spacing. (Inherited from HtmlTextWriter.)
Public methodWrite(String, Object, Object)Writes a formatted string that contains the text representation of two objects to the output stream, along with any pending tab spacing. This method uses the same semantics as the String.Format method. (Inherited from HtmlTextWriter.)
Public methodWrite(String, Object, Object, Object)Writes a formatted string to the text string or stream, using the same semantics as the String.Format(String, Object, Object, Object) method. (Inherited from TextWriter.)
Public methodWriteAsync(Char)Writes a character to the text string or stream asynchronously. (Inherited from TextWriter.)
Public methodWriteAsync(Char[])Writes a character array to the text string or stream asynchronously. (Inherited from TextWriter.)
Public methodWriteAsync(String)Writes a string to the text string or stream asynchronously. (Inherited from TextWriter.)
Public methodWriteAsync(Char[], Int32, Int32)Writes a subarray of characters to the text string or stream asynchronously. (Inherited from TextWriter.)
Public methodWriteAttribute(String, String)Writes the specified markup attribute and value to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteAttribute(String, String, Boolean)Writes the specified markup attribute and value to the output stream, and, if specified, writes the value encoded. (Inherited from HtmlTextWriter.)
Public methodWriteBeginTagWrites any tab spacing and the opening tag of the specified markup element to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteBreakWrites a <br /> markup element to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteEncodedTextEncodes the specified text for the requesting device, and then writes it to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteEncodedUrlEncodes the specified URL, and then writes it to the output stream. The URL might include parameters. (Inherited from HtmlTextWriter.)
Public methodWriteEncodedUrlParameterEncodes the specified URL parameter for the requesting device, and then writes it to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteEndTagWrites any tab spacing and the closing tag of the specified markup element. (Inherited from HtmlTextWriter.)
Public methodWriteFullBeginTagWrites any tab spacing and the opening tag of the specified markup element to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine()Writes a line terminator string to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Boolean)Writes any pending tab spacing and the text representation of a Boolean value, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Char)Writes any pending tab spacing and a Unicode character, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Char[])Writes any pending tab spacing and an array of Unicode characters, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Decimal)Writes the text representation of a decimal value followed by a line terminator to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLine(Double)Writes any pending tab spacing and the text representation of a double-precision floating-point number, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Int32)Writes any pending tab spacing and the text representation of a 32-byte signed integer, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Int64)Writes any pending tab spacing and the text representation of a 64-byte signed integer, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Object)Writes any pending tab spacing and the text representation of an object, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Single)Writes any pending tab spacing and the text representation of a single-precision floating-point number, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(String)Writes any pending tab spacing and a text string, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(UInt32)Writes any pending tab spacing and the text representation of a 4-byte unsigned integer, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(UInt64)Writes the text representation of an 8-byte unsigned integer followed by a line terminator to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLine(String, Object)Writes any pending tab spacing and a formatted string containing the text representation of an object, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(String, Object[])Writes any pending tab spacing and a formatted string that contains the text representation of an object array, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(Char[], Int32, Int32)Writes any pending tab spacing and a subarray of Unicode characters, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(String, Object, Object)Writes any pending tab spacing and a formatted string that contains the text representation of two objects, followed by a line terminator string, to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteLine(String, Object, Object, Object)Writes out a formatted string and a new line, using the same semantics as Format. (Inherited from TextWriter.)
Public methodWriteLineAsync()Writes a line terminator asynchronously to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLineAsync(Char)Writes a character followed by a line terminator asynchronously to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLineAsync(Char[])Writes an array of characters followed by a line terminator asynchronously to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLineAsync(String)Writes a string followed by a line terminator asynchronously to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLineAsync(Char[], Int32, Int32)Writes a subarray of characters followed by a line terminator asynchronously to the text string or stream. (Inherited from TextWriter.)
Public methodWriteLineNoTabsWrites a string, followed by a line terminator string, to the output stream. This method ignores any specified tab spacing. (Inherited from HtmlTextWriter.)
Public methodWriteStyleAttribute(String, String)Writes the specified style attribute to the output stream. (Inherited from HtmlTextWriter.)
Public methodWriteStyleAttribute(String, String, Boolean)Writes the specified style attribute and value to the output stream, and encodes the value, if specified. (Inherited from HtmlTextWriter.)
Protected methodWriteUrlEncodedStringWrites the specified string, encoding it according to URL requirements. (Inherited from HtmlTextWriter.)
Top

  NameDescription
Protected fieldCoreNewLineStores the newline characters used for this TextWriter. (Inherited from TextWriter.)
Top

The Html32TextWriter class is an alternative to the HtmlTextWriter class. It converts HTML 4.0 style attributes into the equivalent HTML 3.2 tags and attributes. It standardizes the propagation of attributes, such as colors and fonts, using HTML tables. ASP.NET automatically uses this class for HTML 3.2 and earlier browsers by checking the TagWriter property of the HttpBrowserCapabilities class. Unless you create a custom page or control adapter that targets devices that use HTML 3.2 markup, you do not need to create an instance of the Html32TextWriter class explicitly.

For more information about customizing page and control rendering, see Walkthrough: Developing and Using a Custom Web Server Control.

The following code example demonstrates how to use a class, named CustomHtml32TextWriter, that derives from the Html32TextWriter class. CustomHtml32TextWriter creates two constructors that follow the pattern that is established by the HtmlTextWriter class and overrides the RenderBeforeContent, RenderAfterContent, RenderBeforeTag, and RenderAfterTag methods.

using System.IO;
using System.Web.UI;

namespace Examples.AspNet
{
	public class CustomHtml32TextWriter : Html32TextWriter
	{
		// Create a constructor for the class 
		// that takes a TextWriter as a parameter. 
		public CustomHtml32TextWriter(TextWriter writer) 
			: this(writer, DefaultTabString) 
		{
		}

		// Create a constructor for the class that takes 
		// a TextWriter and a string as parameters. 
		public CustomHtml32TextWriter(TextWriter writer, String tabString) 
			: base(writer, tabString)
		{
		}
		
		// Override the RenderBeforeContent method to render 
		// styles before rendering the content of a <th> element. 
		protected override string RenderBeforeContent()
		{
			// Check the TagKey property. If its value is 
			// HtmlTextWriterTag.TH, check the value of the  
			// SupportsBold property. If true, return the 
			// opening tag of a <b> element; otherwise, render 
			// the opening tag of a <font> element with a color 
			// attribute set to the hexadecimal value for red. 
			if (TagKey == HtmlTextWriterTag.Th)
			{
				if (SupportsBold)
					return "<b>";
				else 
					return "<font color=\"FF0000\">";
			}

			// Check whether the element being rendered 
            // is an <H4> element. If it is, check the  
            // value of the SupportsItalic property. 
            // If true, render the opening tag of the <i> element 
            // prior to the <H4> element's content; otherwise,  
            // render the opening tag of a <font> element  
            // with a color attribute set to the hexadecimal 
            // value for navy blue. 
			if (TagKey == HtmlTextWriterTag.H4)
			{
				if (SupportsItalic)
					return "<i>";
				else 
					return "<font color=\"000080\">";
			}
			// Call the base method. 
			return base.RenderBeforeContent();
		}

		// 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();
		}

        // Override the RenderBeforeTag method to render the 
        // opening tag of a <small> element to modify the text size of  
        // any <a> elements that this writer encounters. 
		protected override string RenderBeforeTag()
		{
            // Check whether the element being rendered is an  
            // <a> element. If so, render the opening tag 
            // of the <small> element; otherwise, call the base method. 
			if (TagKey == HtmlTextWriterTag.A)
				return "<small>";
			return base.RenderBeforeTag();
		}

        // Override the RenderAfterTag method to render 
        // close any elements opened in the RenderBeforeTag 
        // method call. 
		protected override string RenderAfterTag()
		{
            // Check whether the element being rendered is an 
            // <a> element. If so, render the closing tag of the 
            // <small> element; otherwise, call the base method. 
			if (TagKey == HtmlTextWriterTag.A)
				return "</small>";
			return base.RenderAfterTag();
		}
	}
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft