IHtmlHelper.TextBox(String, Object, String, Object) 메서드

정의

지정된 expression에 <대해 "text" 형식의 입력> 요소를 반환합니다. 에 있는 ModelState 첫 번째 비값null이 포함된 요소에 "value" 특성을 추가합니다. 즉, 전체 이름을 가진 항목, 매개 변수, value 전체 이름의 항목, ViewDataexpression 에 대해 Model평가된 항목 또는 htmlAttributes 키 "value"가 있는 사전 항목입니다. "전체 이름"에 대한 자세한 내용은 를 참조하세요 Name(String) .

public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ TextBox(System::String ^ current, System::Object ^ value, System::String ^ format, System::Object ^ htmlAttributes);
public:
 Microsoft::AspNetCore::Html::IHtmlContent ^ TextBox(System::String ^ expression, System::Object ^ value, System::String ^ format, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent TextBox (string current, object value, string format, object htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent TextBox (string expression, object value, string format, object htmlAttributes);
abstract member TextBox : string * obj * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
abstract member TextBox : string * obj * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function TextBox (current As String, value As Object, format As String, htmlAttributes As Object) As IHtmlContent
Public Function TextBox (expression As String, value As Object, format As String, htmlAttributes As Object) As IHtmlContent

매개 변수

currentexpression
String

현재 모델을 기준으로 하는 식 이름입니다.

value
Object

이 아닌null 경우 요소에 포함할 값입니다.

format
String

모델 바인딩에서 나온 경우가 아니면 "value" 특성의 형식을 지정하는 데 사용되는 형식 문자열(참조 https://msdn.microsoft.com/en-us/library/txafckwd.aspx)입니다.

htmlAttributes
Object

Object 요소에 대한 HTML 특성이 들어 있는 입니다. IDictionary<TKey,TValue> 또는 HTML 특성을 포함하는 instance.

반환

입력> 요소를 포함하는 새 IHtmlContent 입니다<.

설명

및 를 HtmlFieldPrefix 결합하여 입력> 요소의 "name" 특성을 설정합니다<.expression expression 요소의 "id" 특성을 설정하도록 삭제합니다.

적용 대상