Reputation: 1714
I am implementing a project in asp.net where I am using calender extender of Ajax toolkit.
The calender extender is used in the content page. But it is not correctly showing the calender. The calender is misplaced from the 'textbox' which owns the calender extender.
Upvotes: 3
Views: 1881
Reputation: 67
The best way to solve this issue is just add an ajax assembly to your page, on the top:
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
And don't forget to add the tagprefix on the calender extender as "ajaxToolkit".
ex:
<ajaxToolkit:CalendarExtender ID="txtPostingDate_CalendarExtender"
runat="server" Enabled="True" TargetControlID="txtPostingDate"
Format="MM/dd/yyyy">
</ajaxToolkit:CalendarExtender>
Upvotes: 0
Reputation: 134
You just write the style for the Calendar Extender in a seperate CSS class,
Then assign it to the Calendar Extender.
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" CssClass="CalendarCSS"/>
Upvotes: 3
Reputation: 887
Make sure the TargetControlID of the Calendar Extender is equal to the TextBoxID and then you include the PopupPosition property.
For example:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" PopupPosition="Right"></cc1:CalendarExtender>
I hope it helps you.
Upvotes: 1
Reputation: 2000
Try this ..
<asp:TextBox ID="TextBox1" runat="server"/>
<asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1" CssClass="CalendarCSS"/>
Upvotes: 2