Top "Editorfor" questions

Html attributes for EditorFor() in ASP.NET MVC

Why can't I pass in html attributes to EditorFor()? eg; <%= Html.EditorFor(model => model.Control.PeriodType, new { disabled = "…

html asp.net-mvc editorfor
MVC4 DataType.Date EditorFor won't display date value in Chrome, fine in Internet Explorer

I'm using the DataType.Date attribute on my model and an EditorFor in my view. This is working fine in …

asp.net-mvc asp.net-mvc-4 editorfor
MVC3 EditorFor readOnly

I want to make readOnly with EditorFor in edit page. I tried to put readonly and disabled as: <div …

asp.net-mvc-3 readonly editorfor
Html5 Placeholders with .NET MVC 3 Razor EditorFor extension?

Is there a way to write the Html5 placeholder using @Html.EditorFor, or should I just use the TextBoxFor extension …

asp.net-mvc html editorfor
MVC and EditorFor width

Can I set the width of an EditorFor control on my View? I have set a few parameters: [Required, DisplayName("…

c# asp.net-mvc-2 editorfor
how to set default value HTML.EditorFor()

How can I set a default value in my editorboxes so that in case I don't write anything in the …

asp.net-mvc razor editorfor
mvc3 maxLength input

this may be kind of general but i want to limit the number of character inpit in an editorfor field. @…

asp.net-mvc asp.net-mvc-3 editorfor
EditorFor() for a List of Complex Type (MVC)

I'm trying to create an EditorFor() for a List of a Complex Type. Specifically the "Options" below should get displayed …

c# asp.net-mvc asp.net-mvc-4 razor editorfor
Converting HTML.EditorFor into a drop down (html.dropdownfor?)

Currently I am using a Html.EditorFor control in a default 'Create' View page like this. <%: Html.EditorFor(model =&…

asp.net-mvc drop-down-menu html-helper editorfor
Can EditorFor() be used to create <input type="file">?

Given this model, is it possible to use the Html.EditorFor() to render a file upload input element to the …

c# asp.net-mvc asp.net-mvc-2 editorfor