Issue with Panel control Visibility
Hi
I have issues with the visibility of the Dynamic Panel control 'pan1'.
-I have a Dynamic Button control, and if i hover my mouse on it, i want the Dynamic Panel control to popsup.
-The issue is The Dynamic Panel control is visible FOR A SECOND in a Page_load event and goes away. and when i hover on the Button control its working.
-But i want the Panel control to popup only when i hover on the Button, not in Page_load event.
i think its because in my code i added:
Panel pan1=new Panel();
pan1.cssClass="popupMenu";
Form.Controls.Add(pan1);
- if i create the same controls in a design time and set its visibility in cssClass its working, the issue is with Dynamically created controls.
-Here is my codes.
i just attached from my cssClass, the following code asusual in .aspx page.
<link href="AnimSheet.css"...
"AnimSheet.css" contains:
.popupMenu
{
height: 400px;
width: 400px;
visibility:hidden;
background-color: #800000;
}
.popupMenu:hover
{
visibility: visible;
}
So in "Default.aspx.cs": i added
pan1.CssClass = "popupMenu";
But it wasn't working.The Panel itself is hidden even when i hover on it. Please help.
-if i comment this line "visibility:hidden;"
Then the Panel is visible also in Page_load event for a second and goes away.
|