I know that the calendar extender is suppose to hide when you click outside of the control, but it's not for me. I'm using the calendar control in association with a button. Both the button and the control are being added dynamically to the page. The follow is the code used to build these controls.
oNewImage =New ImageoNewImage.EnableViewState =True
oNewImage.TabIndex = 0
oNewImage.CssClass ="CalendarPopup"
oNewImage.ID ="CalendarPopup" &CInt(glintCountCalendarImage)oNewImage.ImageUrl ="..\images\CALENDAR.ICO"
oNewImage.Visible =True
oNewAjaxCalendar =New AjaxControlToolkit.CalendarExtenderoNewAjaxCalendar.TargetControlID = oNewTextBox.ID.ToString
oNewAjaxCalendar.OnClientShowing ="showingCalendar"
oNewAjaxCalendar.PopupButtonID = oNewImage.ID.ToString
oNewAjaxCalendar.Format ="MMddyy"
oNewAjaxCalendar.CssClass ="icmsCalendar"
oNewAjaxCalendar.PopupPosition = AjaxControlToolkit.CalendarPosition.BottomRight
oNewAjaxCalendar.ID ="AJAXCALENDAR" &CInt(glintCountCalendarImage)oNewAjaxCalendar.OnClientDateSelectionChanged ="hideCalendar"
oNewTextBox.Attributes.Add("JUSTIFY","RJ")
oWebForm.Controls.Add(oNewImage)
oWebForm.Controls.Add(oNewAjaxCalendar)
Hi James,
Use an ImageButton instead of an Image!
Let me know how that works out ;)
Kind regards,
Wim
No comments:
Post a Comment