ValueExtensions Class

 

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

Namespace:   System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

System.Object
  System.Web.Mvc.Html.ValueExtensions

<ExtensionAttribute>
Public NotInheritable Class ValueExtensions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticValue(HtmlHelper, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

System_CAPS_pubmethodSystem_CAPS_staticValue(HtmlHelper, String, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

System_CAPS_pubmethodSystem_CAPS_staticValueFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)))

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

System_CAPS_pubmethodSystem_CAPS_staticValueFor(Of TModel, TProperty)(HtmlHelper(Of TModel), Expression(Of Func(Of TModel, TProperty)), String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

System_CAPS_pubmethodSystem_CAPS_staticValueForModel(HtmlHelper)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

System_CAPS_pubmethodSystem_CAPS_staticValueForModel(HtmlHelper, String)

Provides a mechanism to create custom HTML markup compatible with the ASP.NET MVC model binders and templates.

The following code example shows how to create custom helper.

@helper TextBoxFor(Expression<Func<object, TProperty>> expression) {
     <input type="text" value="@Html.ValueFor(expression)" 
         name="@Html.NameFor(expression)">
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: