title: asp.net textbox changed event not fired when value is changed using jquery
body: <p>I am using jquery ui datepicker in my asp.net page inside gridview header row like this:</p>
  
  <pre><code> &lt;asp:TemplateField SortExpression="Published" &gt; 
              &lt;HeaderTemplate&gt;
                &lt;span id="spDate"&gt;
                  &lt;asp:Button ID="Button2" runat="server"  Text="&lt;%$ Resources:Vacancies, DateRange %&gt;" CssClass="chenge-a" /&gt;
                  &lt;/span&gt;
  
              &lt;/HeaderTemplate&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Literal ID="PublishedLiteral" runat="server" 
                      Text='&lt;%# DateTime.Parse(Eval("Published", "{0:m}")) == DateTime.Now.Date ? string.Format("&lt;span class=greenText&gt;{0}&lt;/span&gt;", GetGlobalResourceObject("Vacancies", "VacancyToday")) : DateTime.Parse(Eval("Published", "{0:d}")).ToString("dd MMM") %&gt;' /&gt;
                        -
                        &lt;asp:Literal ID="DeadlineLiteral" runat="server" 
                      Text='&lt;%# DateTime.Parse(Eval("Deadline", "{0:m}")) == DateTime.Now.Date ? string.Format("&lt;span class=orangeText&gt;{0}&lt;/span&gt;", GetGlobalResourceObject("Vacancies", "VacancyToday")) : DateTime.Parse(Eval("Deadline", "{0:d}")).ToString("dd MMM") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>and then using following Jquery code to change the value of a textbox:</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
    $(".chenge-a").datepicker({
                  onSelect: function (value, date) {
                     alert('The chosen date is ' + value);
                      $(".txt").val(value);
                  }
              });
  
              $(".txt").on('change', function () {
                  alert('I am pretty sure the text box changed');
              });
   });
  </code></pre>
  
  <p>Textbox is like this:</p>
  
  <pre><code>&lt;asp:TextBox ID="txtdatetemp" runat="server" AutoPostBack="True" 
      ontextchanged="txtdatetemp_TextChanged" class="txt"  &gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>and it is outside gridview. I have attached server side text_changed event to it</p>
  
  <pre><code>   protected void txtdatetemp_TextChanged(object sender, EventArgs e)
          {
  
          }
  </code></pre>
  
  <p>but it is not called. Neither client side function</p>
  
  <pre><code> $(".txt").on('change', function () 
  </code></pre>
  
  <p>is called.</p>
  
  <p>I want to rebind the gridview on change of date in jquery ui datepicker. Please suggest solution to it.</p>
  
  <p>Thanks</p>