Hello all,
I am new to .Net.I inserted calendar display for two text boxes (Start Date and End Date).When I click on the calendar for the first time, the image is very crude and not properly displayed but after the first click the calendars for both the text boxes are perfect.I am not able to understand where the problem is .Here is my related piece of code:
<asp:FormView ID="fvProjectDetails" runat="server"
DataKeyNames="ProjectID" DataSourceID="esProjectDetailsDataSource"
DefaultMode="Edit">
<HeaderTemplate>
<span class="textHeader">Step 1. Edit Project Information<br /></span>
</HeaderTemplate>
<InsertItemTemplate>
<p>
Title: <br /><asp:TextBox ID="txtTitle" runat="server"
Text='<%# Bind("Title") %>' BorderStyle="Solid" BorderWidth="1px" Width="75%" />
<br />Start Date: <br />
<ajaxToolkit:CalendarExtender ID="calendarStartDate1" runat="server" TargetControlID="txtStartDateI" PopupButtonID="ImageButton1" format="MM/dd/yyyy"
>
</ajaxToolkit:CalendarExtender>
<asp:TextBox ID="txtStartDateI" runat="server" Text='<%# Bind("StartDate") %>' BorderStyle="Solid" BorderWidth="2px"
Width="50%" AutoPostBack="True">
</asp:TextBox>
<asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="ico_calendar.gif" AlternateText="Click here to display calendar"/>
<br />
End Date: <br />
<ajaxToolkit:CalendarExtender ID="calendarEndDate1" runat="server" TargetControlID="txtEndDateI" PopupButtonID="ImageButton2" format="MM/dd/yyyy"
>
</ajaxToolkit:CalendarExtender>
<asp:TextBox ID="txtEndDateI" runat="server"
Text='<%# Bind("EndDate") %>' BorderStyle="Solid" BorderWidth="2px"
Width="50%" AutoPostBack="True">
</asp:TextBox>
<asp:ImageButton runat="Server" ID="ImageButton2" ImageUrl="ico_calendar.gif" AlternateText="Click here to display calendar"/>
<br />
-Thanks,
Sravani.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).