Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am new to ajax calender control.

here my code is:

XML
<asp:TextBox ID="txtActDate" runat="server" CssClass="textSmallmand"></asp:TextBox>
<ajax:CalendarExtender ID="calActDate" runat="server" TargetControlID="txtActDate" PopupButtonID="imgCal" Format="dd/mm/yyyy">
</ajax:CalendarExtender>
<asp:ImageButton ID="imgCal" runat="server" Height="19px" ImageUrl="~/date_picker2.gif" Width="34px" CausesValidation="False" />




the problem is all controls are displaying, but when i click the Imagebutton, the calander control is not displaying.

Can anyone help?

Thanks in Advance
Posted

1 solution

Your TargetControlID in CalendarExtender is set to Textbox and not ImageButton.

Check here of how to use CalendarExtender:
Calendar Demonstration[^]

Look at the properties and how you bind the extender to particular control.
Change the TargetControlID to ImageButton and it should work.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900