How do I deactivate @Editorfor?

Asked

Viewed 16 times

1

I’m doing a project of CRUD in ASP NET MVC in the part of editing the information the team code is being pulled from the bank and is appearing in the @EditorFor and would like to make it so that it could not be edited. as if it were a readonly of html

Follow the field code:

@Html.EditorFor(model => model.cd_time, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.cd_time, "", new { @class = "text-danger" })

1 answer

0


  • 1

    I got it! Thank you!

  • If it is useful to tick as an answer to your question @Beatricebenetti

Browser other questions tagged

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