Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Onmouseover

Reply
Thread Tools

Onmouseover

 
 
Leon
Guest
Posts: n/a
 
      06-03-2010
Hi evrybody.

I have a hyperlink that I add to my webpage dynamically (in my code). I need
it to be underlined only when user hovers over it.
I put in my code:
MyHyperLink.Font.Underline = False

and thought something like:
MyHyperLink.Attributes.Add("onmouseover", "this.Font.Underline=True")
would work for me.
But it does not work for me.
What would be the correct syntax?

Thank you.
 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      06-04-2010
Leon wrote:
> I have a hyperlink that I add to my webpage dynamically (in my code).
> I need it to be underlined only when user hovers over it.
> I put in my code:
> MyHyperLink.Font.Underline = False
>
> and thought something like:
> MyHyperLink.Attributes.Add("onmouseover", "this.Font.Underline=True")
> would work for me.
> But it does not work for me.
> What would be the correct syntax?


In onmouseover, you're working client-side in Javascript, so

onmouseover="this.style.textDecoration='underline' "

--
Andrew


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataList <td onMouseOver> Ryan Moore ASP .Net 5 10-12-2004 01:44 PM
OnMouseOver for a DataGrid control =?Utf-8?B?QXZpIFNoaWxvbg==?= ASP .Net 5 07-12-2004 03:53 AM
Onmouseover Frances Valdes ASP .Net 7 03-03-2004 12:35 PM
ASP.NET ImageButton and OnMouseOver Jay ASP .Net 2 09-30-2003 01:31 PM
How to change onmouseover and onmouseout dynamically Tor Inge Rislaa ASP .Net 3 08-06-2003 04:43 PM



Advertisments