Adding style to Editor For

前端 未结 5 1100
独厮守ぢ
独厮守ぢ 2020-12-18 21:48

I\'m trying to apply a Style to the Editor for an element, but I can\'t make it work; what am I doing wrong?

@Html.EditorFor(model => model.ClienteNuevo)
         


        
5条回答
  •  一个人的身影
    2020-12-18 22:24

    You can create own css class and appendd it to your editor:

    @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "custom-editor" } })
    @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
    

提交回复
热议问题