I have to enable and disable the text box using jQuery, which works fine. The disabled text box has value in it. But the issue I am facing is that, the disabled textbox doesn't pass value to server.When I enable it using jQuery, I see text box value in code behind (Debugging mode). Any ideas why this is happening or alternative approach to get value from disabled textbox in code behind.
HTML:
<asp:TextBox ID="txtUniqueNo" runat="server" onkeyup = "OnChange(this)" required/>
Javascript that i use to disable in view page
var inputBox = $("#<%=txtUniqueNo.ClientID%>");
inputBox.prop('disabled', true);
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…