mouseover to change button color

Discussion in 'ASP .Net' started by slinky, Jul 13, 2007.

  1. slinky

    slinky Guest

    Does anyone know how I can get the following code finished. I'm trying
    to dreate a onmouseover event to change the color of a button. Here's
    my .vb: ( I included other code for the button that is for the
    on click event)
    _________________________________________________________________________________________
    Protected Sub Button1_OnMouseOver()(ByVal sender As Object, ByVal
    e As System.EventArgs) Handles
    Button1_OnMouseOver ???????????????????????? Change
    color ???????????????????

    Protected Sub Button11_Click(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles Button11.Click
    Response.Redirect("http://something.com/something.htm")
    End Sub
    _________________________________________________________________________________________
     
    slinky, Jul 13, 2007
    #1
    1. Advertising

  2. slinky

    nahid Guest

    On Jul 13, 8:11 pm, slinky <> wrote:
    > Does anyone know how I can get the following code finished. I'm trying
    > to dreate a onmouseover event to change the color of a button. Here's
    > my .vb: ( I included other code for the button that is for the
    > on click event)
    > ___________________________________________________________________________­______________
    > Protected Sub Button1_OnMouseOver()(ByVal sender As Object, ByVal
    > e As System.EventArgs) Handles
    > Button1_OnMouseOver ???????????????????????? Change
    > color ???????????????????
    >
    > Protected Sub Button11_Click(ByVal sender As Object, ByVal e As
    > System.EventArgs) Handles Button11.Click
    > Response.Redirect("http://something.com/something.htm")
    > End Sub
    > ___________________________________________________________________________­______________


    hi,
    try to use java script for this

    <html>
    <head>
    <script type="text/javascript">
    function mouseOver()
    {
    document.b1.src ="b_blue.gif"
    }
    function mouseOut()
    {
    document.b1.src ="b_pink.gif"
    }
    </script>
    </head><body>
    <asp:Button onmouseover="mouseOver()" onmouseout="mouseOut()">

    </body>
    </html>

    hope help


    nahid
    http://nahidulkibria.blogspot.com/
    http://www.kaz.com.bd
     
    nahid, Jul 13, 2007
    #2
    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. Matt Adams
    Replies:
    0
    Views:
    909
    Matt Adams
    Aug 26, 2003
  2. Kamaljeet Saini
    Replies:
    0
    Views:
    464
    Kamaljeet Saini
    Feb 13, 2009
  3. Replies:
    7
    Views:
    395
    Mick White
    Feb 2, 2005
  4. Replies:
    2
    Views:
    206
    Danny
    Jan 8, 2006
  5. Amy
    Replies:
    2
    Views:
    269
Loading...

Share This Page