Last post Jan 13, 2019 04:49 AM by email@example.com
Jan 13, 2019 04:25 AM|Robert John|LINK
In my MVC view I have made some input disabled. But those values are required in model. So, I need to submit in controller post method. How can I submit those? Thanks for your help!
Jan 13, 2019 04:36 AMfirstname.lastname@example.org|LINK
Basicall, I use this way for CheckBox or CheckBoxFor because making it disabled is causing the losing the value. Readonly doesn't work on checkbox neither.
@Html.DisplayFor(m => m.column1)
@Html.HiddenFor(m => m.column1)
You also can try
Jan 13, 2019 04:45 AM|Robert John|LINK
it looks fine. But I want to avoid hidden
Jan 13, 2019 04:49 AMemail@example.com|LINK
You can also use code like this before the form submits:
For more to know you can follow this
Please mark as answer if it helps you. Thanks!