InputExtensions.TextBox Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TextBox(HtmlHelper, String, Object, String, Object) |
Returns a text input element. |
TextBox(HtmlHelper, String, Object, String, IDictionary<String,Object>) |
Returns a text input element. |
TextBox(HtmlHelper, String, Object, String) |
Returns a text input element. |
TextBox(HtmlHelper, String, Object) |
Returns a text input element by using the specified HTML helper, the name of the form field, and the value. |
TextBox(HtmlHelper, String, Object, IDictionary<String,Object>) |
Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. |
TextBox(HtmlHelper, String) |
Returns a text input element by using the specified HTML helper and the name of the form field. |
TextBox(HtmlHelper, String, Object, Object) |
Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. |
TextBox(HtmlHelper, String, Object, String, Object)
Returns a text input element.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, string format, object htmlAttributes);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object, format As String, htmlAttributes As Object) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
- format
- String
A string that is used to format the input.
- htmlAttributes
- Object
An object that contains the HTML attributes to set for the element.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String, Object, String, IDictionary<String,Object>)
Returns a text input element.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, string format, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj * string * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object, format As String, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
- format
- String
A string that is used to format the input.
- htmlAttributes
- IDictionary<String,Object>
An object that contains the HTML attributes to set for the element.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String, Object, String)
Returns a text input element.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, string format);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object, format As String) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
- format
- String
A string that is used to format the input.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String, Object)
Returns a text input element by using the specified HTML helper, the name of the form field, and the value.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String, Object, IDictionary<String,Object>)
Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, System.Collections.Generic.IDictionary<string,object> htmlAttributes);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj * System.Collections.Generic.IDictionary<string, obj> -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object, htmlAttributes As IDictionary(Of String, Object)) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
- htmlAttributes
- IDictionary<String,Object>
An object that contains the HTML attributes to set for the element.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String)
Returns a text input element by using the specified HTML helper and the name of the form field.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name);
static member TextBox : System.Web.Mvc.HtmlHelper * string -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
Returns
An input element whose type attribute is set to "text".
Applies to
TextBox(HtmlHelper, String, Object, Object)
Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes.
public static System.Web.Mvc.MvcHtmlString TextBox (this System.Web.Mvc.HtmlHelper htmlHelper, string name, object value, object htmlAttributes);
static member TextBox : System.Web.Mvc.HtmlHelper * string * obj * obj -> System.Web.Mvc.MvcHtmlString
<Extension()>
Public Function TextBox (htmlHelper As HtmlHelper, name As String, value As Object, htmlAttributes As Object) As MvcHtmlString
Parameters
- htmlHelper
- HtmlHelper
The HTML helper instance that this method extends.
- name
- String
The name of the form field and the ViewDataDictionary key that is used to look up the value.
- value
- Object
The value of the text input element. The value is retrieved in this order - the ModelStateDictionary object, the value of this parameter, the ViewDataDictionary object, and lastly, a value attribute in the html attributes.
- htmlAttributes
- Object
An object that contains the HTML attributes to set for the element.
Returns
An input element whose type attribute is set to "text".