1
I have the following error in mine View: as I pass @class="classe boot-strap" is not used, whether or not View within the parameter @class he insists on using the 'text-box single-line', Just below I’ll leave the code snippets.
Code Razor:
@Html.EditorFor(model => model.DataManutencao, new { @class = "span2 control-label" })
Chrome debugger HTML code:
<input class="text-box single-line" data-val="true" data-val-date="The field Data Agendamento must be a date." data-val-required="Este campo é obrigatório!" id="DataManutencao" name="DataManutencao" type="datetime" value="01/01/0001">
Try to change the
EditorForforTextBoxFor. In MVC 3,EditorFordoes not work well with HTML attributes.– MurariAlex
I used to use the textBoxFor, it works, but I can not use the model data Annotations, have to solve this problem or just passing the HTML attributes through the tags same?
– vinicius