View Source
Class HtmlTagWrapper
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public class HtmlTagWrapper : IHtmlTagWrapper, IHtmlString
Constructors
View Source
HtmlTagWrapper(String)
Declaration
public HtmlTagWrapper(string tag)
Parameters
Type |
Name |
Description |
System.String |
tag |
|
Fields
View Source
CssClasses
Declaration
public List<string> CssClasses
Field Value
Type |
Description |
System.Collections.Generic.List<System.String> |
|
View Source
Parent
Declaration
public HtmlTagWrapper Parent
Field Value
View Source
Tag
Declaration
Field Value
Type |
Description |
System.String |
|
View Source
Visible
Declaration
Field Value
Type |
Description |
System.Boolean |
|
Properties
View Source
Attributes
Declaration
public IEnumerable<KeyValuePair<string, string>> Attributes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
|
View Source
Children
Declaration
public IEnumerable<IHtmlTagWrapper> Children { get; }
Property Value
Methods
View Source
AddChild(String)
Declaration
public HtmlTagWrapper AddChild(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
View Source
AddChild(IHtmlTagWrapper)
Declaration
public HtmlTagWrapper AddChild(IHtmlTagWrapper newChild)
Parameters
Returns
View Source
AddChildAt(Int32, String)
Declaration
public HtmlTagWrapper AddChildAt(int index, string text)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
System.String |
text |
|
Returns
View Source
AddChildAt(Int32, IHtmlTagWrapper)
Declaration
public HtmlTagWrapper AddChildAt(int index, IHtmlTagWrapper newChild)
Parameters
Returns
View Source
AddChildren(IHtmlTagWrapper[])
Declaration
public HtmlTagWrapper AddChildren(params IHtmlTagWrapper[] collection)
Parameters
Returns
View Source
AddChildrenAt(Int32, IHtmlTagWrapper[])
Declaration
public HtmlTagWrapper AddChildrenAt(int index, params IHtmlTagWrapper[] collection)
Parameters
Returns
View Source
AddClassName(String)
Declaration
public HtmlTagWrapper AddClassName(string className)
Parameters
Type |
Name |
Description |
System.String |
className |
|
Returns
View Source
Attr(Object)
Declaration
public HtmlTagWrapper Attr(object newAttributes)
Parameters
Type |
Name |
Description |
System.Object |
newAttributes |
|
Returns
View Source
Attr(String, String)
Declaration
public HtmlTagWrapper Attr(string name, string value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
value |
|
Returns
View Source
ClearChildren()
Declaration
public HtmlTagWrapper ClearChildren()
Returns
View Source
CountChildren()
Declaration
public int CountChildren()
Returns
Type |
Description |
System.Int32 |
|
View Source
HasClassName(String)
Declaration
public bool HasClassName(string className)
Parameters
Type |
Name |
Description |
System.String |
className |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ReflectAttributesFromAnonymousType(List<KeyValuePair<String, String>>)
Declaration
public void ReflectAttributesFromAnonymousType(List<KeyValuePair<string, string>> newAttributes)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String, System.String>> |
newAttributes |
|
View Source
ReflectAttributesFromAnonymousType(Object)
Declaration
public void ReflectAttributesFromAnonymousType(object anonymousAttributes)
Parameters
Type |
Name |
Description |
System.Object |
anonymousAttributes |
|
View Source
RemoveChildAt(Int32)
Declaration
public HtmlTagWrapper RemoveChildAt(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
|
Returns
View Source
RemoveClassName(String)
Declaration
public HtmlTagWrapper RemoveClassName(string className)
Parameters
Type |
Name |
Description |
System.String |
className |
|
Returns
View Source
ToHtml()
Declaration
public IHtmlString ToHtml()
Returns
Type |
Description |
System.Web.IHtmlString |
|
View Source
ToHtmlString()
Declaration
public string ToHtmlString()
Returns
Type |
Description |
System.String |
|
View Source
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
View Source
Write()
Declaration
public HtmlString Write()
Returns
Type |
Description |
System.Web.HtmlString |
|
View Source
WriteToHtmlTextWriter(HtmlTextWriter)
Declaration
public void WriteToHtmlTextWriter(HtmlTextWriter html)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
html |
|