Re: rollover buttons



If this button is an image you can add the attribute runat=server this
will allow you to access this image in the code behind via the

System.Web.UI.HtmlControls
Then in you code behind create a protected variable like so

protected System.Web.UI.HtmlControls.HtmlImage imageName;

Then in the Page_load method you can do this.

imageName.Attributes.add("onMouseOver", "doRollover()")

What this does is render a image tag when the page loads that will look
like this

<img src="asdfsaf.gif" onMouseOver="foRollover()">

now the java script can be written as normal.

Hope that helps,
Brette

.


Quantcast