When you have a asp.net textbox control defined in RadInputManager as TextBoxSetting and
If you disable the textbox control client-side prior to postback, the value is lost on postback.
Consider the following code:
If you disable the textbox control client-side prior to postback, the value is lost on postback.
Consider the following code:
<%@ Page Language="C#" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <script runat="server"> protected void btnGo_Click(object sender, EventArgs e) { Response.Write(tbPayeeLine1.Text); }</script><html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>RadControls for ASP.NET AJAX</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <telerik:RadInputManager ID="RadInputManager1" runat="server"> <telerik:TextBoxSetting BehaviorID="PayeeLine1Behavior" EmptyMessage="Enter Payee / Beneficiary Name Here" ErrorMessage="Payee/Beneficiary Required" Validation-IsRequired="true" Validation-ValidationGroup="ValGrpPayeeInfo"> <TargetControls> <telerik:TargetInput ControlID="tbPayeeLine1" /> </TargetControls> </telerik:TextBoxSetting> </telerik:RadInputManager> <asp:TextBox ID="tbPayeeLine1" name="payee" runat="server" MaxLength="33" Width="300px" /><asp:Button ID="btnDisable" runat="server" Text="Disable" OnClientClick="DisableTextBox();return false;"></asp:Button><asp:Button ID="btnGo" runat="server" Text="Go" onclick="btnGo_Click"></asp:Button><script type="text/javascript"> function DisableTextBox() { debugger; var tb = $find("<%= RadInputManager1.ClientID %>").get_targetInput("<%= tbPayeeLine1.ClientID %>"); //tb.disable() alert(tb.get_value()); document.getElementById('<%= tbPayeeLine1.ClientID%>').disabled = true; } </script> </form> </body> </html>