Class HtmlNameExtensions
Gets the HTML ID and name attributes of the DotNetNuke.Web.Mvc.HtmlHelper string.
Inheritance
Namespace: DotNetNuke.Web.Mvc.Helpers
Assembly: DotNetNuke.Web.Mvc.dll
Syntax
public static class HtmlNameExtensions : object
Methods
| Improve this Doc View SourceId(DnnHtmlHelper, String)
Gets the ID of the DotNetNuke.Web.Mvc.HtmlHelper string.
Declaration
public static MvcHtmlString Id(this DnnHtmlHelper html, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper | html | The HTML helper instance that this method extends. |
| System.String | name | An expression that identifies the object that contains the ID. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The HTML ID attribute value for the object that is represented by the expression. |
IdFor<TModel, TProperty>(DnnHtmlHelper<TModel>, Expression<Func<TModel, TProperty>>)
Gets the ID of the DotNetNuke.Web.Mvc.HtmlHelper string.
Declaration
public static MvcHtmlString IdFor<TModel, TProperty>(this DnnHtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper<TModel> | html | The HTML helper instance that this method extends. |
| Expression<Func<TModel, TProperty>> | expression | An expression that identifies the object that contains the ID. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The HTML ID attribute value for the object that is represented by the expression. |
Type Parameters
| Name | Description |
|---|---|
| TModel | The type of the model. |
| TProperty | The type of the property. |
IdForModel(DnnHtmlHelper)
Gets the ID of the DotNetNuke.Web.Mvc.HtmlHelper string.
Declaration
public static MvcHtmlString IdForModel(this DnnHtmlHelper html)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper | html | The HTML helper instance that this method extends. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The HTML ID attribute value for the object that is represented by the expression. |
Name(DnnHtmlHelper, String)
Gets the full HTML field name for the object that is represented by the expression.
Declaration
public static MvcHtmlString Name(this DnnHtmlHelper html, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper | html | The HTML helper instance that this method extends. |
| System.String | name | An expression that identifies the object that contains the name. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The full HTML field name for the object that is represented by the expression. |
NameFor<TModel, TProperty>(DnnHtmlHelper<TModel>, Expression<Func<TModel, TProperty>>)
Gets the full HTML field name for the object that is represented by the expression.
Declaration
public static MvcHtmlString NameFor<TModel, TProperty>(this DnnHtmlHelper<TModel> html, Expression<Func<TModel, TProperty>> expression)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper<TModel> | html | The HTML helper instance that this method extends. |
| Expression<Func<TModel, TProperty>> | expression | An expression that identifies the object that contains the name. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The full HTML field name for the object that is represented by the expression. |
Type Parameters
| Name | Description |
|---|---|
| TModel | The type of the model. |
| TProperty | The type of the property. |
NameForModel(DnnHtmlHelper)
Gets the full HTML field name for the object that is represented by the expression.
Declaration
public static MvcHtmlString NameForModel(this DnnHtmlHelper html)
Parameters
| Type | Name | Description |
|---|---|---|
| DnnHtmlHelper | html | The HTML helper instance that this method extends. |
Returns
| Type | Description |
|---|---|
| MvcHtmlString | The full HTML field name for the object that is represented by the expression. |