他们都看在网页上视觉上相似,但他们每个人的HTML是相当不同:MVC4中的Html.TextBox和Html.Editor有什么区别?
<input id="TEST" name="TEST" type="text" value="this one's filled in, but editor isn't">
<input class="text-box single-line" id="TEST" name="TEST" type="text" value="">
的docs说Returns an HTML input element for each property in the object that is represented by the expression.
为Html.Editor
虽然Html.TextBox说Returns a text input element by using the specified HTML helper and the name of the form field.
这是否意味着你将一个模型的字符串名称传递给Html.Editor
,然后它会为它的每个属性创建一个文本输入,而Html.TextBox
只是一个愚蠢的文本输入而没有其他任何东西后面的场景?