I have an asp.net mvc5 project is there a
@Html.CheckboxFor(model => model.mi_atributo, new { @class = "form-check-input"})
, to which I want to put a message when the pointer is positioned on it, I found this:
@Html.EditorFor(m => m.mi_atributo, new { htmlAttributes = new { Title = "mi mensaje" }, })
, Y
@Html.PasswordFor(m => m.Password, new { Title = "mi mensaje" })
but it doesn't seem to work with CheckboxFor, I use mvc version 5.2.7.0.
You should put all of them
htmlAttributes
together into a single anonymous object.This is how it should work:
Note that the property
mi_atributo
must be of the typebool
in the Model.