I have several checkboxes that I use for display purposes of 'true' and 'false'. Each one will show me the above warning (I made the warning more generic for the purposes of searching. In reality, it reads @Model.Service_Request_Information.Servicelead, etc, instead of @Model.property)
<input class="custom-control-input" type="checkbox" checked="@item.Servicelead" disabled />
I have read that it is okay to write razor code like this, and the HTML will insert/leave out 'checked' from the attributes depending on the value. It works fantastically for how I want it, and it doesn't prevent my code from compiling. So, any ideas on why I am getting this warning?
Aucun commentaire:
Enregistrer un commentaire