它们在网页上看起来很相似,但它们各自的 HTML 却大不相同:
<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="">
文档说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
' 将只是一个愚蠢的文本输入,在幕后没有其他任何东西?