How to disable autocomplete in MVC Html Helper

前端 未结 4 1449
我寻月下人不归
我寻月下人不归 2020-12-28 11:44

I have a typical ADO.NET EF-driven form that allows the user to input a date. I have put a jQuery datepicker on it but when the user goes to select a date the browser shows

4条回答
  •  借酒劲吻你
    2020-12-28 12:21

    Try this:

    <%= Html.TextBoxFor(
        model => model.date, 
        new { @class = "aDatePicker", autocomplete = "off" }
    )%>
    

    It will generate markup that is close to the following:

    
    

提交回复
热议问题