.NET CORE | How to handle fields that cannot be changed (Disabled or Readonly)

Asked

Viewed 37 times

-1

I have a conceptual doubt that may be basic.

Scenario is as follows: I have a field that should appear to the user, it is a sequential numbering that at a given time will be sent by the page Submit.

If you put disabled in the field, the value is not sent in Ubmit. If you put readonly, I can’t update the screen before sending so the user can see the value.

Do you have any way of treating that scenario?

Thank you very much, guys

  • It doesn’t seem to be a conceptual issue, it seems only code error same.

  • Maniero, I don’t understand. Can you tell me a little bit more about?

1 answer

0


Friend, really disabled inputs are not sent by Submit.
One solution would be for you to create a <input type="hidden"> same as disabled, this in turn will be hidden from the user and can be sent because it will not be disabled.

Browser other questions tagged

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