Possible to have non-image based rollover buttons?

Discussion in 'ASP .Net' started by Doug, Jun 26, 2006.

  1. Doug

    Doug Guest

    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.
     
    Doug, Jun 26, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
     
    Ken Cox [Microsoft MVP], Jun 26, 2006
    #2
    1. Advertising

  3. Doug

    Doug Guest

    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. ;-)
     
    Doug, Jul 12, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dave

    rollover buttons

    dave, May 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,411
  2. Leythos
    Replies:
    4
    Views:
    3,599
    Leythos
    Mar 30, 2005
  3. Gepi Solo

    PyGTK - Rollover Buttons

    Gepi Solo, Sep 7, 2006, in forum: Python
    Replies:
    0
    Views:
    402
    Gepi Solo
    Sep 7, 2006
  4. Mark Szlazak
    Replies:
    3
    Views:
    179
    Fletch
    Apr 25, 2006
  5. Dan
    Replies:
    3
    Views:
    131
Loading...

Share This Page