disable form field saving in browser, autocomplete

asp.net-mvc-3

Solution

`@Html.EditorFor` doesn't take an `object htmlAttributes` as a second argument (or any argument for that matter).

Try using `@Html.TextBoxFor` instead:

 @Html.TextBoxFor(model => model.ConfirmPassword, new { autocomplete = "off" })

Problem

I am trying to disable autocomplete feature in browser and put autocomplete="off" attribute on Input. I have tried to use code below but it do not put autocomplete="off" on generated Input html tag. What is the correct way to do this? ``` @Html.EditorFor(model => model.ConfirmPassword, new { autocomplete = "off" }) ```

Original source