Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Possible to have non-image based rollover buttons?

Reply
Thread Tools

Possible to have non-image based rollover buttons?

 
 
Doug
Guest
Posts: n/a
 
      06-26-2006
Using ASP.NET, is this possible? All I want is something simple, like
bold-facing the text.
An alternative would be to use plain text links (IE 6.0, so we can rely
on CSS and the anchor hover).

Maybe there's a 3rd party control out there that does this? Possible
to make your own? Thoughts? Thanks.

 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      06-26-2006
Hi Doug,

There's lots you can do with dynamic HTML on regular buttons. You just need
to change the styles. See the sample below.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]



<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Button1.Attributes.Add _
("onmouseover", "this.style.fontWeight='bold'")
Button1.Attributes.Add _
("onmouseout", "style.fontWeight='normal';" & _
"this.style.backgroundColor='white'")
End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Change button</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:button id="Button1" runat="server" text="Hover over me!"
/></div>
</form>
</body>
</html>

"Doug" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Using ASP.NET, is this possible? All I want is something simple, like
> bold-facing the text.
> An alternative would be to use plain text links (IE 6.0, so we can rely
> on CSS and the anchor hover).
>
> Maybe there's a 3rd party control out there that does this? Possible
> to make your own? Thoughts? Thanks.
>



 
Reply With Quote
 
 
 
 
Doug
Guest
Posts: n/a
 
      07-12-2006
Worked like a charm. Thanks.

Sorry it took so long to reply.

Please reply if you see this. I'm curious to see if people read these
things if there is no activity for a day or two. Or sixteen.

 
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
HOW U CAN START A HOME BASED BUSINESSARE YOU THINKING TO HAVE A HOME BASED BUSINESS nancyflorida C++ 0 11-12-2007 11:54 PM
HOW U CAN START A HOME BASED BUSINESSARE YOU THINKING TO HAVE A HOME BASED BUSINESS nancyflorida C++ 0 11-12-2007 11:54 PM
HOW U CAN START A HOME BASED BUSINESSARE YOU THINKING TO HAVE A HOME BASED BUSINESS nancyflorida Java 0 11-12-2007 11:53 PM
Login "rollover" button question VB Programmer ASP .Net 0 06-09-2004 12:54 PM
Cisco Rollover Cable... Dave Cisco 4 11-29-2003 05:02 PM



Advertisments