Change background image of asp:button


I

Israel Richner

I know I can use <a></a> and modify it's :hover and :visited appearance
in my .css file. I'd like to know if I can do the same for a asp:button
control.

I'd like to do some processing of data in the on click event for the
asp:button control and I would like to be able to control it's
"visited" and "hover" appearance.

Using a hyperlink I would just write this in the .css file

a:hover
{
blah blah;}

a:visited
{
blah blah;}

Can I do the same for an asp:button? If so how?

I've tried using the asp:hyperlink but it does not have an on click
event in the code behind page.

I'm somewhat new to web programming so if there is a better approach to
this issue please let me know.

Thanks,
Iz
 
Ad

Advertisements

I

Israel Richner

Thanks Mark that looks like the control I'm looking for.

Will I still use

a:hover
{
background-image: url("somepath");}

....in order to change the background image when the user hovers over
the link?

Iz
 
M

Mark Rae

Will I still use

a:hover
{
background-image: url("somepath");}

...in order to change the background image when the user hovers over
the link?

Well, have you tried it...? ;-)
 
Ad

Advertisements

I

Israel Richner

I guess I should have before I asked.....it works great!

Thanks Mark,
Iz
 

Top