Is there a way to OnTextChanged working even after setting visible=false? I have a legacy asp page that has a number of postbacks and refreshes. I'm using this text box as a session variable since the equivalent variable in the code behind can get unexpectedly cleared during one of the many refresh events. This textbox can be changed because of a wanted ajax auto-complete call and I need to know when it does.
<asp:TextBox runat="server" Visible="false" ID="txtClientId" CssClass="text-box" AutoPostBack="True" OnTextChanged="OnClientIdChanged" />
You are correct, it's my ajax to update the field that is failing while the text box is not visible. I put in the variable "t" to look at what I just set and it is failing. Is my only option to enable visibility, set the value, then disable visibility?
function SupplierSelected(source, eventArgs)
{
var client = JSON.parse(eventArgs._value);
$("#ctl00_cphMasterPage_txtClientId").val(client.Id);
var t = $("#ctl00_cphMasterPage_txtClientId").val();
}