TagBuilder Class
Contains classes and properties that are used to create HTML elements. This class is used to write helpers, such as those found in the System.Web.Helpers namespace.
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
The TagBuilder type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Attributes | Gets the collection of attributes. |
![]() | IdAttributeDotReplacement | Gets or sets a string that can be used to replace invalid HTML characters. |
![]() | InnerHtml | Gets or sets the inner HTML value for the element. |
![]() | TagName | Gets the tag name for this tag. |
| Name | Description | |
|---|---|---|
![]() | AddCssClass | Adds a CSS class to the list of CSS classes in the tag. |
![]() ![]() | CreateSanitizedId(String) | Replaces each invalid character in the tag ID with a valid HTML character. |
![]() ![]() | CreateSanitizedId(String, String) | Replaces each invalid character in the tag ID with the specified replacement string. |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GenerateId | Generates a sanitized ID attribute for the tag by using the specified name. |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | MergeAttribute(String, String) | Adds a new attribute to the tag. |
![]() | MergeAttribute(String, String, Boolean) | Adds a new attribute or optionally replaces an existing attribute in the opening tag. |
![]() | MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue>) | Adds new attributes to the tag. |
![]() | MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue>, Boolean) | Adds new attributes or optionally replaces existing attributes in the tag. |
![]() | SetInnerText | Sets the InnerHtml property of the element to an HTML-encoded version of the specified string. |
![]() | ToString() | Renders the element as a Normal element. (Overrides Object.ToString().) |
![]() | ToString(TagRenderMode) | Renders the HTML tag by using the specified render mode. |
Show:
