They both look visually similar on the web page, but the HTML for each of them is fairly different:
<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="">
The docs say Returns an HTML input element for each property in the object that is represented by the expression. for Html.Editor
While Html.TextBox says Returns a text input element by using the specified HTML helper and the name of the form field.
Does that mean you pass a model’s string name to Html.Editor and then it’ll create a text input for each of it’s properties, while a Html.TextBox‘ll just be a dumb text input with nothing else behind the scenes?
HTML.Textbox:
Returns a text input element by using the specified HTML helper and the name of the form field.
HTML.Editor:
This method generates different HTML markup depending on the data type of the property that is being rendered, and according to whether the property is marked with certain attributes.
If the property is typed as a primitive type (integer, string, and so on), the method renders an HTML input element for a text box.
If a property is marked with a data-type attribute or a UIHintAttribute attribute, the attribute specifies the markup that is generated for the property. For example, if the property is marked with the MultilineText attribute, the method generates markup for a multi-line text box.