title: ASP.NET Ajax CalendarExtender will not update SelectedDate value
body: <p>For some reason, any CalendarExtenders on an ASP.NET site that is being worked on will not be updated. I have already checked all the obvious places (such as AutoPostBack and AutoEventHandler). The problem is that when I select a date from the Calendar and post it to the form, the TextBox that is being extended IS being updated, but the calendar extender's date is simply not being being updated (e.g. SelectedDate is still the same as before). I have googled for any possible solutions but none have worked.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
      AutoEventWireup="true" CodeBehind="ThePage.aspx.cs" Inherits="ThePage" %&gt;
  
  &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %&gt;
  
  &lt;asp:TextBox runat="server" ID="txtBlah" /&gt;
  &lt;asp:CalendarExtender ID="txtBlahExtender" runat="server" TargetControlID="txtBlah" Format="MMMM d, yyyy" /&gt;
  &lt;asp:Button runat="server" ID="btnSubmit" CausesValidation="false" /&gt;
  </code></pre>
  
  <p>and the codebehind:</p>
  
  <pre><code>public partial class ThePage : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              if (!IsPostBack)
              {
                  txtBlahExtender.SelectedDate = DateTime.Today.AddDays(4);
              }
          }
  
          protected void btnSubmit_Click(object sender, EventArgs e)
          {
           //do postback actions        
          }
      }
  }
  </code></pre>
  
  <p>When my code reaches "do postback actions", txtBlahExtender.SelectedDate is ALWAYS DateTime.Today.AddDays(4). It simply doesn't register the change.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks,
  Logain Smith</p>
  
  <p>(Is it possible to do formatting on a question?)</p>