HtmlTextWriter.GetTagName Method
.NET Framework 3.0
Obtains the markup element associated with the specified HtmlTextWriterTag enumeration value.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
protected String GetTagName ( HtmlTextWriterTag tagKey )
protected function GetTagName ( tagKey : HtmlTextWriterTag ) : String
Not applicable.
Parameters
- tagKey
The HtmlTextWriterTag to obtain the markup element for.
Return Value
A string representing the markup element.The following code example demonstrates how to close a <font> element by using the WriteEndTag method. The WriteEndTag method calls the GetTagName method to convert the Font value to a string.
// Close the Font element.
Write(GetTagName(HtmlTextWriterTag.Font));
}
Community Additions
ADD
Show: