ASP.NET Image Rollover Using VB

For a simple image rollover using your vb codebehind page and a couple of png files or whatever file type you wish to use. I’m not sure where I found this bit of script but it came in handy a few weeks ago!

<asp:ImageButton runat="server" ID="tbimage" ImageUrl="img/LeftMenuButton.png" Style="float: left;
outline: 0; width: 21px" />

In your VB Codebehind page:

    Private Sub Page_Load(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles MyBase.Load

        tbimage.Attributes.Add("onMouseOver", _
        tbimage.Attributes.Add("onMouseOut", _
    End Sub


~ by worldcrossings on June 23, 2010.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: