PDA

View Full Version : Mouse Move Events



jerry_yasir
12-18-2003, 07:04 AM
Hi
Can any one please give me mouse move and mouse over events for a hyperlink control in asp.net. I want to change the color of the hyper link on mouse pointer on the link.

thanks

paulhiles
12-18-2003, 08:48 AM
Hi Yasir,

First off I should point out that this is not my area of expertise by any stretch of the imagination. Though I'm sure there are members here who do possess the relevant skills. Anyhow I did a bit of digging and found some potentially useful links.

I wasn't sure whether you're looking for a method to globally change the color of your hyperlinks.. or to create a MouseOver link.. similar to that used in many standard web-pages (using either JavaScript or CSS).

There is the Microsoft page (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiwebcontrolshyperlinkclasstopic.asp ) for the HyperLink class (which lists its various properties)

ForeColor is apparently inherited from WebControl - which gets or sets the foreground color (typically the color of the text) of the Web server control.

Examples of setting color properties for WebControl are shown here (http://authors.aspalliance.com/aspxtreme/sys/Web/UI/WebControls/WebControlClassForeColor.aspx):

An alternative would be to set style at design time
Web Forms Controls and CSS Styles
as shown here (http://authors.aspalliance.com/aspxtreme/webforms/controls/webformscontrolscssstyles.aspx?pageno=3)

Finally an example (available for download) illustrating how an image rollover can be achieved
Image Rollover with ASP.net using RollOverLink Control
http://metabuilders.com/Tools/RollOverLink.aspx

Hope these help in some way, can anyone else help?
I know we have some ASP.net gurus out there somewhere! ;-)

Paul