title: ASP.NET how to assign to CalendarExtender attribute SelectedDate = CalendarTextBox.Text
body: <p>ASP.NET with AjaxContolToolkit.</p>
  
  <p>I have a <code>CalendarExtender</code> inside editable <code>GridView</code> control.</p>
  
  <p>I want to do a simple thing: assing an existring date value of <code>TextBox.Text</code> or <code>Label.Text</code> to the <code>SelectedDate</code> attribute to make editing more user-friendly. The task is pretty simple, isn't it?!</p>
  
  <pre><code>...
  &lt;ItemTemplate&gt;
  &lt;asp:Label ID="accdateLbl" runat="server" Text='&lt;%# Bind("totalaccdate") %&gt;'&gt;&lt;/asp:Label&gt; 
  &lt;/ItemTemplate&gt;
  &lt;EditItemTemplate&gt;
  &lt;asp:TextBox ID="accdateEditTxtBox" runat="server" Text='&lt;%# Eval("totalaccdate") %&gt;' ReadOnly="True" /&gt;
  &lt;asp:CalendarExtender ID="accdateEditTxtBoxCalendarExtender" runat="server" TargetControlID="accdateEditTxtBox" Format="dd-MM-yyyy" PopupButtonID="accdateEditCalImage" 
  StartDate="01-01-2011" EndDate='&lt;%# DateTime.Now %&gt;' SelectedDate='???'/&gt;
  &lt;asp:Image ID="accdateEditCalImage" runat="server" ImageUrl="~/images/calendar.gif" /&gt;
  &lt;/EditItemTemplate&gt;
  ...
  </code></pre>
  
  <p>I've tried many snippets, nothing helped!</p>
  
  <p>And, please, could it be done <strong>without</strong> additional JavaScript.</p>
  
  <p>Thank you!</p>