Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > LinkButtons and MouseOver

Reply
Thread Tools

LinkButtons and MouseOver

 
 
sramruttun
Guest
Posts: n/a
 
      07-08-2003
I have an ascx page which acts as a menu. The menu has a table with a no of
linkbuttons. When the app is running, if I put my mouse over any linkbutton,
I get something like this in the status bar:
javascript: __doPostBack('Menu1$LBClient',")
Of course, LBClient is the name of i linkbutton.

Questions:
1) Is there a way to remove this, and instead have something like
'client.aspx' or nothing at all?
2) How do I implement a MouseOver event so that the linkbutton changes color
when I move my mouse around the linkbuttons? - I tried it, I was not able to
change the color of the linkbutton but the background color.


 
Reply With Quote
 
 
 
 
Victor Garcia Aprea [MVP]
Guest
Posts: n/a
 
      07-12-2003
Hi sramruttun,

1) You need to use javascript for this. Take a look at window.status
2) There is a onmouseover event, but for changing color when mouse is over a
link you could avoid using this event for the simpler solution of using CSS,
something like:
<style>
.yourstyle {color:red}
.yourstyle:hover {color:blue}
</style>
<a href="A" class="yourstyle">blah</a>

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx
To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
and not by private mail.

"sramruttun" <> wrote in message
news:...
> I have an ascx page which acts as a menu. The menu has a table with a no

of
> linkbuttons. When the app is running, if I put my mouse over any

linkbutton,
> I get something like this in the status bar:
> javascript: __doPostBack('Menu1$LBClient',")
> Of course, LBClient is the name of i linkbutton.
>
> Questions:
> 1) Is there a way to remove this, and instead have something like
> 'client.aspx' or nothing at all?
> 2) How do I implement a MouseOver event so that the linkbutton changes

color
> when I move my mouse around the linkbuttons? - I tried it, I was not able

to
> change the color of the linkbutton but the background color.
>
>



 
Reply With Quote
 
 
 
 
sramruttun
Guest
Posts: n/a
 
      07-14-2003
thanks victor
1)the CSS method works
2)I came to know about the window.status and it worked too

"Victor Garcia Aprea [MVP]" <> wrote in message
news:...
> Hi sramruttun,
>
> 1) You need to use javascript for this. Take a look at window.status
> 2) There is a onmouseover event, but for changing color when mouse is over

a
> link you could avoid using this event for the simpler solution of using

CSS,
> something like:
> <style>
> .yourstyle {color:red}
> .yourstyle:hover {color:blue}
> </style>
> <a href="A" class="yourstyle">blah</a>
>
> --
> Victor Garcia Aprea
> Microsoft MVP | ASP.NET
> Looking for insights on ASP.NET? Read my blog:
> http://obies.com/vga/blog.aspx
> To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
> and not by private mail.
>
> "sramruttun" <> wrote in message
> news:...
> > I have an ascx page which acts as a menu. The menu has a table with a no

> of
> > linkbuttons. When the app is running, if I put my mouse over any

> linkbutton,
> > I get something like this in the status bar:
> > javascript: __doPostBack('Menu1$LBClient',")
> > Of course, LBClient is the name of i linkbutton.
> >
> > Questions:
> > 1) Is there a way to remove this, and instead have something like
> > 'client.aspx' or nothing at all?
> > 2) How do I implement a MouseOver event so that the linkbutton changes

> color
> > when I move my mouse around the linkbuttons? - I tried it, I was not

able
> to
> > change the color of the linkbutton but the background color.
> >
> >

>
>



 
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
Can my links and linkbuttons have two different css styles? gwen.lister@gmail.com ASP .Net 1 09-19-2006 06:14 PM
Strange Behavior from RequiredFieldValidator (and Two LinkButtons) JJ ASP .Net 1 02-26-2005 12:05 PM
LoadPostData and LinkButtons Lucas Tam ASP .Net 0 08-18-2003 12:57 PM
LinkButtons and MouseOver sramruttun ASP .Net Web Controls 1 07-09-2003 07:11 AM
Re: LinkButtons and MouseOver Vidar Petursson ASP .Net 1 07-09-2003 07:10 AM



Advertisments