I've got a simple Ajax CalendarExtender that pops and works great, but ONLY after I have clicked on some other button on the page that causes a postback. The postback code reads the datefield, gets some data from the database and then displays it. It's not manipulating the TextBox or the Extender in code-behind.

My textbox and extender is in an Update Panel with Master Pages, using ASP.Net 4.0 and c#. I have tried using ToolScriptManager instead of ScriptManager and that didn't make any difference. Someone suggested wrapping my Textbox and Extender in a DIV, and that didn't help either.

<span id="startDateArea">
    <asp:Label runat="server" Text="Start Date" />
    <asp:TextBox runat="server" ID="startDateTxt"></asp:TextBox>
    <asp:CalendarExtender runat="server" TargetControlID="startDateTxt" PopupPosition="TopLeft" />

I'm not sure what other code you would need to see as it works fine after the postback?

Here is our register line: <%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit, Version=4.1.51116.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" %>

Related posts

Recent Viewed