Calendar Control in ASP.Net using Ajax Toolkit
-
I used a Calendar control in my ASP.Net code. I have three text boxes with three different calendar controls. But when I click on one calendar, other two calendars are also opening up. Also required field validators error messages are also showing beside the textboxes control. Here is my code
<td width="34%"><asp:TextBox ID="txtClaimDate" runat="server" Width="100%" ></asp:TextBox>
<asp:ImageButton runat="Server" ID="img3" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalClaimDate" runat="server" TargetControlID="txtClaimDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td><td width="16.5%">
<asp:TextBox ID="txtInDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td><td width="16.5%">
<asp:TextBox ID="txtPuDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPuDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td>Now when I click on second calendar "txtIndate/Ca
-
I used a Calendar control in my ASP.Net code. I have three text boxes with three different calendar controls. But when I click on one calendar, other two calendars are also opening up. Also required field validators error messages are also showing beside the textboxes control. Here is my code
<td width="34%"><asp:TextBox ID="txtClaimDate" runat="server" Width="100%" ></asp:TextBox>
<asp:ImageButton runat="Server" ID="img3" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalClaimDate" runat="server" TargetControlID="txtClaimDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td><td width="16.5%">
<asp:TextBox ID="txtInDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td><td width="16.5%">
<asp:TextBox ID="txtPuDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPuDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td>Now when I click on second calendar "txtIndate/Ca
I solved this upto one extend. I mean PopupbuttonId is same. It should be the image ID of their respective button. But now when I click on any calendar, It shows "*" for the fields. This means Requiredfieldsvalidator's error messages are "*" so it shows all the fields with "*". Please help in solving that.
Your help is much appreciated. Thanks Happy Coding!