TagBuilder
Assembly: ServiceStack.Razor.dll
View Source
Declaration
public class TagBuilder
Properties
Attributes
View Source
Declaration
public IDictionary<string, string> Attributes { get; }
InnerHtml
View Source
Declaration
public string InnerHtml { get; set; }
TagName
View Source
Declaration
public string TagName { get; }
Fields
IdAttributeDotReplacement
View Source
Declaration
public const string IdAttributeDotReplacement = "_"
Methods
AddCssClass(String)
View Source
Declaration
public void AddCssClass(string value)
Parameters
Type | Name |
---|---|
System.String | value |
CreateSanitizedId(String)
View Source
Declaration
public static string CreateSanitizedId(string originalId)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | originalId |
GenerateId(String)
View Source
Declaration
public void GenerateId(string name)
Parameters
Type | Name |
---|---|
System.String | name |
MergeAttribute(String, String)
View Source
Declaration
public void MergeAttribute(string key, string value)
Parameters
Type | Name |
---|---|
System.String | key |
System.String | value |
MergeAttribute(String, String, Boolean)
View Source
Declaration
public void MergeAttribute(string key, string value, bool replaceExisting)
Parameters
Type | Name |
---|---|
System.String | key |
System.String | value |
System.Boolean | replaceExisting |
MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue>)
View Source
Declaration
public void MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue> attributes)
Parameters
Type | Name |
---|---|
System.Collections.Generic.IDictionary<<TKey>,<TValue>> | attributes |
Type Parameters
TKey
TValue
MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue>, Boolean)
View Source
Declaration
public void MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue> attributes, bool replaceExisting)
Parameters
Type | Name |
---|---|
System.Collections.Generic.IDictionary<<TKey>,<TValue>> | attributes |
System.Boolean | replaceExisting |
Type Parameters
TKey
TValue
SetInnerText(String)
View Source
Declaration
public void SetInnerText(string innerText)
Parameters
Type | Name |
---|---|
System.String | innerText |
ToString()
View Source
Declaration
public override string ToString()
Returns
System.String
ToString(TagRenderMode)
View Source
Declaration
public string ToString(TagRenderMode renderMode)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Html.TagRenderMode | renderMode |