I have ever seen this behavior when a field is disabled. Because of this, I usually have a javascript function that handles form submission and re-includes them in submit, so the correct values are sent to the server.
Something like this does the trick for me (NOTE: I use jQuery):
$(document).ready() { $("#ButtonSubmit").click(SubmitForm); } function SubmitForm(e) { e.preventDefault(); //ensure fields are enabled, this example does text and checkbox types $("[type='text']").attr("disabled", false); $("[type='checkbox']").attr("disabled", false); //submit the form document.forms[0].submit(); }
I don’t know about an easier way to do this, it would be nice if you could “tag” something that instructs all the fields to send. But I do not know if this exists, maybe someone else can offer a better solution.
EDIT . It seems that disabled fields that are not sent are only the nature of HTML and are not something that is related to MVC.
It seems that if you create readonly fields instead of disabled , then the values will still be sent. However, with this approach, you lose the "disabled" style. An exception to this rule is select control, it seems that this will not be sent to readonly . More information on this may be in this matter.
source share