InputExtensions.TextBoxFor 方法

定義

多載

TextBoxFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, String)

傳回文字輸入專案。

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

使用指定的 HTML 屬性,傳回物件中每個屬性的文字輸入元素,由指定的運算式表示。

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

傳回文字輸入專案。

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

傳回指定運算式所表示之物件中每一個屬性的文字 input 元素。

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

使用指定的 HTML 屬性,傳回物件中每個屬性的文字輸入元素,由指定的運算式表示。

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

傳回文字輸入專案。

TextBoxFor<TModel,TProperty>(HtmlHelper<TModel>, Expression<Func<TModel,TProperty>>, String)

傳回文字輸入專案。

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

類型參數

TModel

模型的型別。

TProperty

值的類型。

參數

htmlHelper
HtmlHelper<TModel>

此方法擴充的 HTML Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要顯示之屬性的物件。

format
String

用來格式化輸入的字串。

傳回

其 type 屬性設定為 "text" 的 input 元素。

適用於

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

使用指定的 HTML 屬性,傳回物件中每個屬性的文字輸入元素,由指定的運算式表示。

public static System.Web.Mvc.MvcHtmlString TextBoxFor<TModel,TProperty> (this System.Web.Mvc.HtmlHelper<TModel> htmlHelper, System.Linq.Expressions.Expression<Func<TModel,TProperty>> expression, object htmlAttributes);
static member TextBoxFor : System.Web.Mvc.HtmlHelper<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Property>> * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBoxFor(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 Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要呈現之屬性的物件。

htmlAttributes
Object

物件,包含要針對項目設定的 HTML 屬性。

傳回

HTML input 元素,其屬性 (Attribute) 會針對運算式所表示之物件中的每一個屬性 (Property) 設定為 "text"。

例外狀況

參數 expression 為 Null 或空白。

適用於

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

傳回文字輸入專案。

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

類型參數

TModel

模型的型別。

TProperty

值的類型。

參數

htmlHelper
HtmlHelper<TModel>

此方法擴充的 HTML Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要顯示之屬性的物件。

format
String

用來格式化輸入的字串。

htmlAttributes
IDictionary<String,Object>

物件,包含要針對項目設定的 HTML 屬性。

傳回

其 type 屬性設定為 "text" 的 input 元素。

適用於

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

傳回指定運算式所表示之物件中每一個屬性的文字 input 元素。

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

類型參數

TModel

模型的型別。

TProperty

值的類型。

參數

htmlHelper
HtmlHelper<TModel>

此方法擴充的 HTML Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要呈現之屬性的物件。

傳回

HTML input 元素,其屬性 (Attribute) 會針對運算式所表示之物件中的每一個屬性 (Property) 設定為 "text"。

例外狀況

參數 expression 為 Null 或空白。

適用於

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

使用指定的 HTML 屬性,傳回物件中每個屬性的文字輸入元素,由指定的運算式表示。

public static System.Web.Mvc.MvcHtmlString TextBoxFor<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 TextBoxFor : 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 TextBoxFor(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 Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要呈現之屬性的物件。

htmlAttributes
IDictionary<String,Object>

字典,其中包含要針對項目設定的 HTML 屬性。

傳回

HTML 輸入元素類型屬性會針對運算式所代表之物件中的每個屬性設定為 「text」。

例外狀況

參數 expression 為 Null 或空白。

適用於

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

傳回文字輸入專案。

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

類型參數

TModel

模型的型別。

TProperty

值的類型。

參數

htmlHelper
HtmlHelper<TModel>

此方法擴充的 HTML Helper 執行個體。

expression
Expression<Func<TModel,TProperty>>

運算式,可識別包含要顯示之屬性的物件。

format
String

用來格式化輸入的字串。

htmlAttributes
Object

物件,包含要針對項目設定的 HTML 屬性。

傳回

其 type 屬性設定為 "text" 的 input 元素。

適用於