title: How to use jquery Datepicker in web control in asp.net?
body: <p>i am creating a web-control and i want to use jquery date-picker on this control, i have tried the below things:
  1). apply all the required jquery code in web-control(<strong>but it does not work for me.</strong>)
  2). apply all the required jquery code in page where i am calling that web-control(<strong>but it does not work for me.</strong>)</p>
  
  <p>Please help me,</p>
  
  <p>Actually what is my purpose to do it is:
  i want to create a generic module for search, to which i will just pass the name of table it would be work automatically, what i have completed up to now is:</p>
  
  <p>1). bind all the columns in a dropdown list 
  now what i want to do is: if the column type is DateTime then it will show a textbox with jquery calendar.   </p>
  
  <p>Please help me to resolve this problem, My code is:</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
      &lt;td&gt;
          &lt;asp:DropDownList ID="drpColumnName" Width="150px" runat="server" AutoPostBack="true"
              OnSelectedIndexChanged="drpColumnName_SelectedIndexChanged"&gt;
          &lt;/asp:DropDownList&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:DropDownList ID="drpOperation" Width="150px" runat="server"&gt;
          &lt;/asp:DropDownList&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:DropDownList ID="drpCondition" Width="150px" runat="server"&gt;
              &lt;asp:ListItem Text="Or" Selected="True" Value="0"&gt;&lt;/asp:ListItem&gt;
              &lt;asp:ListItem Text="And" Value="1"&gt;&lt;/asp:ListItem&gt;
          &lt;/asp:DropDownList&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:TextBox ID="txtSearchText" runat="server" Width="150px"&gt;&lt;/asp:TextBox&gt;
          &lt;asp:TextBox ID="txtDateSearch" CssClass="myClass" runat="server" Width="150px"&gt;&lt;/asp:TextBox&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;asp:Button ID="btnAddConditionToSearch" runat="server" Text="AddToSearch" OnClick="btnAddConditionToSearch_Click" /&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td colspan="5"&gt;
          &amp;nbsp;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Page's code is :</p>
  
  <pre><code>  &lt;form id="form1" runat="server"&gt;
  &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
  &lt;/asp:ScriptManager&gt;
  &lt;div&gt;
      &lt;Search:ctrlSearch ID="cntrlSearch" runat="server" /&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Jquery code is:</p>
  
  <pre><code>     &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
  
      var prm = Sys.WebForms.PageRequestManager.getInstance();
      prm.add_initializeRequest(InitializeRequest);
      prm.add_endRequest(EndRequest);
      // Place here the first init of the DatePicker   
  
      $('.myclass').datepicker();
  
  
  });
  
  function InitializeRequest(sender, args) { }
  function EndRequest(sender, args) {
      // after update occur on UpdatePanel re-init the DatePicker 
  
      $('.myclass').datepicker();
  
  
  }
  </code></pre>
  
  <p></p>
  
  <p>Please help me,</p>