I am interested in using a "onmouseover" event to make a listbox appear and disappear. I am fairly new with ASP.NET and I do not want to write javascript just yet. I am trying to use the following code, and the color change portion of it works, but the listbox visibility doesn't work:
if (!IsPostBack) { Button2.Attributes.Add("onmouseover", "this.style.backgroundColor='Red', ListBox3.style.visibility='visible'"); }
if (!IsPostBack)
{
Button2.Attributes.Add("onmouseout", "this.style.backgroundColor='Blue', ListBox3.style.visibility='hidden'");
}
I have tried this code with and without "PostBack", and still no luck. Does anyone see where my code is failing me?
Thank you,
DFM