How You Configure Checkboxes Materialize Css in Asp.Net MVC Web Application

Asked

Viewed 92 times

0

How do I set up Checkboxes in the Asp.Net MVC Razor

Since in the documentation we have the following configuration Materialize for checkboxes

<p>
  <label>
    <input type="checkbox" />
    <span>Red</span>
  </label>
</p>

And on Razor I couldn’t perform this configuration.

<div class="input-field col s12">
       @Html.EditorFor(model => model.AnuncioDestaque)
       @Html.LabelFor(model => model.AnuncioDestaque)
       @Html.ValidationMessageFor(model => model.AnuncioDestaque, "", new { @class = "text-danger" })
   </div>
  • 1

    This is totally custom and off the grid. To do this you need to write an Htmlhelper that generates html with this structure: https://docs.microsoft.com/pt-br/aspnet/mvc/overview/older-versions-1/views/creating-custom-html-helpers-cs

  • @Ricardopunctual thanks for the documentation I am reading it, but I would like you to assist me in relation to this development, would you show me how to perform this procedure, with the codification performed, so would better assist my knowledge regarding the documentation.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.