This topic contains 2 replies, has 2 voices, and was last updated by Sean Sean 3 years, 4 months ago.

Material Input For Models In MVC


  • ugurcakmak
    Participant

    Posts: 8
    Member Reply #1114

    Hi all, thx for such a beautiful design. I successfully integrated Admin Layout 3 – Material to my MVC project. I want to make my inputs look like the ones in Material Design. I render inputs like this:
    @Html.LabelFor(model => model.Customer.Name)
    @Html.EditorFor(model => model.Customer.Name)
    @Html.ValidationMessageFor(model => model.Customer.Name)

    • This topic was modified 3 years, 4 months ago by  ugurcakmak.

    ugurcakmak
    Participant

    Posts: 8
    Member Reply #1116

    Hello Again, when ı Changed my code as below, it rendered the input as Material Design. It seems that EditorFor doesn’t render custom styles.

    <div class=”col-sm-6″>
    <div class=”form-group form-md-line-input”>
    @Html.TextBoxFor(model => model.Customer.Name, new { @class = “form-control input-sm” })
    @Html.LabelFor(model => model.Customer.Name)
    </div>
    </div>

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #1126

    Hi :),

    Glad you managed to solve it. Good luck with your project!

    Thanks.

You must be logged in to reply to this topic.