hello everyone,
i have a calendar extender in my page. it works fine unless i add a maskedEditExtender as well. Then, when the page start or is post back, the calendar starts off as being visible. is there anyway to hide or disable this control when the page starts, until the user clicks the appropriate text box? the code i have is as follows:
on the codebehind i have:Code:<asp:TextBox ID="TextBox2" runat="server" Width="130px" MaxLength="1" style="text-align:justify" ValidationGroup="MKE" /> <div id="error2" style="color:red"></div> <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="TextBox2" Mask="99/99/9999" MaskType="Date" /> <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2" ControlToValidate="TextBox2" ValidationGroup="MKE2" /> <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="TextBox2" Animated="False" BehaviorID="calendar2" />
which seems to be the problem. this cause the focus to go to the calendar control and sets the date, which shows the extender. i've tried to set focus to other controls but nothing seems to work. any help would be greatCode:Me.TextBox1.Text = Date.Now.AddDays(-7).ToString("MM/dd/yyyy") Me.TextBox2.Text = Date.Now.AddDays(0).ToString("MM/dd/yyyy")
thanks
jason




Reply With Quote