Skip to main content

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
TypeName
System.Stringvalue

CreateSanitizedId(String)

View Source
Declaration
public static string CreateSanitizedId(string originalId)
Returns

System.String

Parameters
TypeName
System.StringoriginalId

GenerateId(String)

View Source
Declaration
public void GenerateId(string name)
Parameters
TypeName
System.Stringname

MergeAttribute(String, String)

View Source
Declaration
public void MergeAttribute(string key, string value)
Parameters
TypeName
System.Stringkey
System.Stringvalue

MergeAttribute(String, String, Boolean)

View Source
Declaration
public void MergeAttribute(string key, string value, bool replaceExisting)
Parameters
TypeName
System.Stringkey
System.Stringvalue
System.BooleanreplaceExisting

MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue>)

View Source
Declaration
public void MergeAttributes<TKey, TValue>(IDictionary<TKey, TValue> attributes)
Parameters
TypeName
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
TypeName
System.Collections.Generic.IDictionary<<TKey>,<TValue>>attributes
System.BooleanreplaceExisting
Type Parameters
  • TKey
  • TValue

SetInnerText(String)

View Source
Declaration
public void SetInnerText(string innerText)
Parameters
TypeName
System.StringinnerText

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
TypeName
ServiceStack.Html.TagRenderModerenderMode