I have searched for two days now to find a solution to this problem and I can't seem to find anything that works for me. I have a LinkButton that is disabled when the page loads. I am disabling the button like this:
$("#BtnSubmit").prop("disabled", true);
$("#BtnSubmit").removeAttr("enabled");
When the user fills out all of the required fields, I am attempting to re-enable the LinkButton like this:
$("#BtnSubmit").removeAttr("disabled");
However, this does not work. I have looked at the generated markup, and it seems that the LinkButton has its href attribute removed when it is set to disabled. Simply removing the disabled attribute does not work. I have also tried adding the enabled attribute like this:
$("#BtnSubmit").attr("enabled", "true");
However, this doesn't work either.
What am I missing? The button is clearly being re-enabled from a design perspective. It goes from its disabled appearance to its enabled appearance just fine, but it doesn't get its href attribute back. I've tried manually adding the href, but that also doesn't work. Most of the solutions I've found just cover how to disable the button; none of them seem to mention anything about re-enabling it. Any suggestions?