Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Server controls and JavaScript
Message
 
To
11/02/2005 17:48:56
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00986187
Message ID:
00986278
Views:
30
You can do something like this... After placing a server-control version of, for example, a image button on your webform, switch to HTML view, find the button and add "onmouseover" and "onmouseout":
<asp:imagebutton id="btnPushMe" runat="server" ImageUrl="MyImageOFF.jpg" onmouseover="this.src='MyImageON.jpg';"
onmouseout="this.src='MyImageOFF.jpg';"></asp:imagebutton>
To address the changing of the background color of the button in the scenario you describe, perhaps this article, "Using JavaScript Along with ASP.NET" on MSDN would be of help:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspnet-usingjavascript.asp

Ciao,
Carl


>All,
>
> I have a button server control on a webform. I am wodering if there is a way to imitate the old frontpage hover button with it? Basically when the user puts the mouse over the button, the background color would change and when the mouse is not over the button, it would change the color back to what it originally was.
>
> Again this would be with a server control command button, not a HTML Command Button.
>
>Is this possible? If so, how?
Carl Olson, Jr.
CEO, Founder
Cerelogic, Inc.

www.cerelogic.com

"Applying rocket science to business."
Previous
Reply
Map
View

Click here to load this message in the networking platform