InputExtensions.HiddenFor 方法

定义

重载

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>)

为由指定表达式表示的对象中的每个属性返回对应的 HTML 隐藏 input 元素。

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, IDictionary<String,Object>)

使用指定的 HTML 属性,返回由指定表达式表示的对象中每个属性的 HTML 隐藏输入元素。

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, Object)

使用指定的 HTML 属性,返回由指定表达式表示的对象中每个属性的 HTML 隐藏输入元素。

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>)

为由指定表达式表示的对象中的每个属性返回对应的 HTML 隐藏 input 元素。

public static System.Web.Mvc.MvcHtmlString HiddenFor<TModel,TProperty> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression);
static member HiddenFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function HiddenFor(Of TModel, TProperty) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty))) As MvcHtmlString

类型参数

TModel

模型的类型。

TProperty

属性的类型。

参数

htmlHelper
HtmlHelper<TModel>

此方法扩展的 HTML 帮助器实例。

expression
Expression<Func<TModel,TProperty>>

一个表达式,用于标识包含要呈现的属性的对象。

返回

一个 input 元素,其 type 特性针对表达式表示的对象中的每个属性均设置为“hidden”。

适用于

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, IDictionary<String,Object>)

使用指定的 HTML 属性,返回由指定表达式表示的对象中每个属性的 HTML 隐藏输入元素。

public static System.Web.Mvc.MvcHtmlString HiddenFor<TModel,TProperty> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member HiddenFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function HiddenFor(Of TModel, TProperty) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty)), htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString

类型参数

TModel

模型的类型。

TProperty

属性的类型。

参数

htmlHelper
HtmlHelper<TModel>

此方法扩展的 HTML 帮助器实例。

expression
Expression<Func<TModel,TProperty>>

一个表达式,用于标识包含要呈现的属性的对象。

htmlAttributes
IDictionary<String,Object>

一个 对象,该对象包含要为 元素设置的 HTML 属性。

返回

一个 input 元素,其 type 特性针对表达式表示的对象中的每个属性均设置为“hidden”。

适用于

HiddenFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, Object)

使用指定的 HTML 属性,返回由指定表达式表示的对象中每个属性的 HTML 隐藏输入元素。

public static System.Web.Mvc.MvcHtmlString HiddenFor<TModel,TProperty> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression, object htmlAttributes);
static member HiddenFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function HiddenFor(Of TModel, TProperty) (htmlHelper As HtmlHelper(Of TModel), expression As Expression(Of Func(Of TModel, TProperty)), htmlAttributes As Object) As MvcHtmlString

类型参数

TModel

模型的类型。

TProperty

属性的类型。

参数

htmlHelper
HtmlHelper<TModel>

此方法扩展的 HTML 帮助器实例。

expression
Expression<Func<TModel,TProperty>>

一个表达式,用于标识包含要呈现的属性的对象。

htmlAttributes
Object

一个 对象,该对象包含要为 元素设置的 HTML 属性。

返回

一个 input 元素,其 type 特性针对表达式表示的对象中的每个属性均设置为“hidden”。

适用于