title: textbox ontextchanged event is firing in update panel but throws error on client side
body: <p>i have two div on page. when first time page load it shows first div which has 2 radio button. if you select second button it does postback and hides first div and shows second div. which has textbox and dropdown inside update panel. insert text into textbox and hit tab it will fire OnTextChanged event. where i am adding option inside the dropdown. but it throws error on client side.</p>
  
  <pre><code>error : "Microsoft JScript runtime error:  Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed."
  </code></pre>
  
  <p>Not sure what to do here.</p>
  
  <p>here is my aspx page.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org   /TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
   &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
   &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
   &lt;/head&gt;
    &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div id="divpanel1" runat="server"&gt;
      &lt;asp:Label ID="Label1" runat="server" Text="Label : "&gt;&lt;/asp:Label&gt;
      &lt;asp:RadioButton ID="RadioButton1" GroupName="lbl" Text="me first" runat="server"/&gt;
      &lt;asp:RadioButton ID="RadioButton2" GroupName="lbl" Text="me second"
          runat="server" AutoPostBack="true" OnCheckedChanged="RadioButton2_CheckedChanged" /&gt;
          &lt;/div&gt;
      &lt;div id="divpanel" runat="server"&gt;
          &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
          &lt;/asp:ScriptManager&gt;
          &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
          &lt;ContentTemplate&gt;
          &lt;asp:TextBox ID="TextBox1" runat="server" AutoPostBack="true" ontextchanged="TextBox1_TextChanged"&gt;&lt;/asp:TextBox&gt;
          &lt;asp:DropDownList ID="DropDownList1" runat="server"&gt;
              &lt;asp:ListItem Selected="True" Value="0"&gt;select&lt;/asp:ListItem&gt;
          &lt;/asp:DropDownList&gt;
          &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
     &lt;/body&gt;
     &lt;/html&gt;
  </code></pre>
  
  <p>here is my code behind.</p>
  
  <pre><code>public partial class _Default : System.Web.UI.Page
  {
     protected void Page_Load(object sender, EventArgs e)
     {
         this.divpanel.Visible = false;
     }
     protected void TextBox1_TextChanged(object sender, EventArgs e)
     {
         this.DropDownList1.Items.Add(this.TextBox1.Text.ToString());
     }
     protected void RadioButton2_CheckedChanged(object sender, EventArgs e)
     {
             this.divpanel.Visible = true;
             this.divpanel1.Visible = false;
     }
   }
  </code></pre>
  
  <p>Thank you for your time.</p>