title: AJAX CalenderExtender Not Working
body: <p>I am using ajax calender extender on my website. </p>
  
  <pre><code> &lt;table border="0" cellpadding="0" cellspacing="0"&gt;
                                          &lt;tr&gt;
                                              &lt;td&gt;Active From: &lt;asp:TextBox ID="inputActiveFromDate" runat="server"&gt;&lt;/asp:TextBox&gt; 
                                                  &lt;cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="inputActiveFromDate" PopupButtonID="btn_Calendar1"   Format="dd/MM/yyyy 00:00:00"&gt;&lt;/cc1:CalendarExtender&gt;
                                                  &lt;asp:ImageButton runat="server" ID="btn_Calendar1" ImageUrl="../images/buttons/Lock_icon.gif" /&gt;
                                              &lt;/td&gt;
                                              &lt;td width="20"&gt;&lt;/td&gt;
                                              &lt;td&gt;Active Until: &lt;asp:TextBox ID="inputActiveUntilDate" runat="server"&gt;&lt;/asp:TextBox&gt;
                                                  &lt;cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="inputActiveUntilDate"  PopupButtonID="btn_Calendar2"  Format="dd/MM/yyyy 23:59:59"&gt;&lt;/cc1:CalendarExtender&gt;
                                                  &lt;asp:ImageButton runat="server" ID="btn_Calendar2" ImageUrl="../images/buttons/Lock_icon.gif" /&gt;
                                              &lt;/td&gt;
                                          &lt;/tr&gt;
                      &lt;/table&gt;
  </code></pre>
  
  <p>everything is working fine, but i am getting this error on all the browsers.</p>
  
  <pre><code>&gt; Unable to set value of the property 'PopupBehavior': object is null or
  &gt; undefined
  </code></pre>
  
  <p>please help me to solve </p>
  
  <p>Error comes at</p>
  
  <pre><code>// Name:        MicrosoftAjax.debug.js
  // Assembly:    AjaxControlToolkit
  // Version:     4.1.50508.0
  // FileVersion: 4.1.50508
  // (c) 2010 CodePlex Foundation
  
  initialize: function Behavior$initialize() {
          Sys.UI.Behavior.callBaseMethod(this, 'initialize');
          var name = this.get_name();
          if (name) this._element[name] = this;// error place &lt;---
      },
  </code></pre>
  
  <p>MY CS CODE:</p>
  
  <pre><code>using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["DBConn"].ToString())){
  
  String  sql = "INSERT INTO tablename (SDate,EDate) VALUES ('" + Convert.ToDateTime(inputActiveFromDate.Text) + "','" + Convert.ToDateTime(inputActiveUntilDate.Text) + "'); SELECT  @@IDENTITY;";conn.Open();
                      SqlCommand comm = new SqlCommand(sql, conn);    
                      comm.ExecuteNonQuery();
                     // int lastId = Convert.ToInt32(comm.ExecuteScalar());
                      conn.Close();
  
  
  
  
                  }
  </code></pre>