disabled control being reenabled but still not posting back contents to server
I have a couple of radio buttons that are controlling text entry into a textarea.
<tr id="trTextNote" runat="server">
<td colSpan="2"></td>
<td class="IndentedCell" noWrap colSpan="2">
<asp:textbox id="txtIncludeNote" runat="server" Width="352px" Height="46px" TextMode="MultiLine" MaxLength="250">
</asp:textbox>
</td>
</tr>
during the .ready, the textarea is being disbled with this
var textNote = $("[id$='txtIncludeNote']");
$(textNote).attr("disabled", "disabled");
$("[id$='lblHeaderNote']").addClass("disabledFont");
Also, in the .ready I am attaching this to the click handlers of the radio buttons ...
$("input[id*='optIncludeNoteYes']").click(function() {
$("[id$='lblHeaderNote']").removeClass("disabledFont");
$("[id$='txtIncludeNote']").removeAttr("disabled");
开发者_高级运维 });
$("input[id*='optIncludeNoteNo']").click(function() {
$("[id$='lblHeaderNote']").addClass("disabledFont");
$("[id$='txtIncludeNote']").attr("disabled", "disabled");
});
On the client side, this all seems to be working perfectly, the text area is disbled when it should, and enabled/disabled when the clicks of the radio buttons happen. The issue is that when the user clicks the optIncludeNoteYes radio button, types in some data, and submits the page ... that data is not available on the server side. If they immediately post back again (with no changes) that data is then available. I put the autopostback = true on the radio buttons, just playing around, with no code behind it, and that fixes the issue as well.
What am I missing?
精彩评论