locked
Why doesn't Ajax calendar extender work until I click any button ? RRS feed

  • Question

  • User-886220824 posted

    I have an AjaxCalendarExtender applied on text box. It doesn't work until i click button within page (any asp button which doesn't post back). After clicking any button it starts working like a charm.

    Why ?

    <asp:TextBox ID="txtBoxDateOfBirth" runat="server" CssClass="form-control"></asp:TextBox>
    <asp:CalendarExtender ID="calExt1" runat="server" Format="dd/MMM/yyyy" TargetControlID="txtBoxDateOfBirth">

    Button:

    <asp:Button ID="btnShowViewPersonalInfo" runat="server" OnClick="btnShowViewPersonalInfo_Click"/>

    this button doesn't nothing big, just changes VIEWs in webform.

    Thursday, January 7, 2016 4:28 PM

All replies

  • User61956409 posted

    Hi StackUnderflow,

    I create a following sample to reproduce your problem, the code working fine. You could try to create a new page using only CalendarExtender control to check whether it will be working.

    <div>
        <asp:TextBox ID="txtBoxDateOfBirth" runat="server"></asp:TextBox>
        <asp:CalendarExtender ID="calExt1" runat="server" Format="dd/MMM/yyyy" TargetControlID="txtBoxDateOfBirth"></asp:CalendarExtender>
    </div>
    

    Best Regards,

    Fei Han

    Friday, January 8, 2016 5:20 AM
  • User-886220824 posted

    Yes it works fine in another pages but not in case of VIEWS

    Friday, January 8, 2016 8:13 AM