views:

23

answers:

1

Hi,

I have a usercontrol which has a combobox inside it.

This UserControl is the inside an asp panel - and when the panel is visible, the dropdownlist within the control binds to its datasource and behaves itself.

When the panel visibility is set to false, the dropdownlist within the usercontrol is empty.

Any help appreciated.

thanks.

+1  A: 

Setting the Visible property of the panel to false means that none of its controls are rendered. If you want it to be rendered but invisible on your page, use the CSS style display:none; on the panel.

Daniel Dyson
Thanks, I am trying this out but have run into a problem.I keep getting a javascript error saying that the panel is not defined.I am applying to button as follow:imb_SearchMain.Attributes.Add("onclick", "javascript:togglePanel(false," ")The function:function togglePanel(showIt, pnl) { if (showIt) { $find(pnl)._show; } else { $find(pnl)._hide; }}thanks.
Perplexed
Have you set your panel.Visible to true now?
Daniel Dyson
It is set to be visible by default yes (although I have not set the property).
Perplexed
Ok, so I got it working using non-jquery code. Thanks for the tip!
Perplexed