Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 18, 2006 02:59 PM by Matt M
Oct 17, 2006 04:20 PM|LINK
I was tryed to use this control into ascx user component. This is the code:
<asp:Panel ID="Panel1" runat="server" CssClass="popupControl">
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" >
<cc1:PopupControlExtender ID="PopupControlExtender1" runat="server">
<cc1:PopupControlProperties TargetControlID="txtTest" PopupControlID="Panel1" Position="Bottom" />
Then I put the component into aspx page into an Atlas-updateControl section.
In the page the calendar control is not completely invisible!!! The table border is showed!
Only after click into the date textbox, the calendar is showed, and click out, the calendar is finally hidden!
What's wrong? is not possible to use control toolkit in an ascx control?
Oct 17, 2006 11:02 PM|LINK
My guess is the CSS class of the Panel is what is causing it to show. Try removing that part of the Panel declaration and replace it with style='visibility: hidden;'.
I'm guessing this because it seems the PopupControlExtender does its own thing with the CSS of the popup control. It fully hides the Panel when you "click out." When you first start the page, though, it defaults to whatever is in your "popupControl" CSS
I'm not sure if it's possible, but perhaps you can programmatically make the popupcontrolextender "fire" to show the control, then cancel it to hide it. Do this is Page_Load and it should take care of it without having to mess with the CSS class you already
Oct 18, 2006 08:49 AM|LINK
tnx for the answer :-)
I was try to change css but don't work! I think that the problem is into the calendar table structure. I can see the table lines of the calendar control!
I can't think that is possible to fire programmatically the popup at page_load event, or I don't know how to.
What other I can do now?
Oct 18, 2006 02:59 PM|LINK
What happens when you change the Calendar to the following:
<asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged"
By making the height 0, you're effectively hiding the entire control. When the popupcontrolextender fires, it resizes and relocates the calendar for you. Let me know if this works.