I would like to autofocus on an editorfor in my application, but I can\'t seem to do that. I have successfully used autofocus on a textbox, but I would like to use an editor
Using .Net Framework 4.5 and MVC 5, this works for me:
@Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control", autofocus = true } })