asp:ImageButton AlternateText (VB.net) : Image Button « Asp Control « ASP.Net

ASP.Net
1. ADO.net Database
2. Asp Control
3. Collections
4. Components
5. Data Binding
6. Development
7. HTML Control
8. Mobile Control
9. Page
10. Request
11. Response
12. Server
13. Session Cookie
14. User Control and Master Page
15. Validation by Control
16. Validation by Function
17. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
ASP.Net » Asp Control » Image Button 
asp:ImageButton AlternateText (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    lblMessage.Text = "Press a button!"
End Sub
Sub SubmitBtn1_Click(Sender As Object, E As ImageClickEventArgs)
    lblMessage.Text = "You clicked at location (" _
        & E.X.ToString() ", " & E.Y.ToString() _
        ")"
End Sub
Sub SubmitBtn2_Click(Sender As Object, E As CommandEventArgs)
    lblMessage.Text = "The button you clicked: " _
        & e.CommandName _
        ", has the following arguement: " _
        & e.CommandArgument & "."
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Image Button Controls Sample Page</TITLE>
</HEAD>
<BODY>
<form runat="server">
<Font Face="Tahoma" Size="+1">
<asp:Label 
    id="lblMessage" 
    Text="Press a button!"
    runat="server"
/>
<BR><BR>
<asp:ImageButton 
    id="butAlone"
    AlternateText="Alone Button"
    ImageURL="./clickme.gif"
    ImageAlign="Middle"
    OnClick="SubmitBtn1_Click" 
    runat="server"
/>
<BR><BR>
<asp:ImageButton 
    id="butAdd"
    AlternateText="Add Record"
    ImageURL="./add.gif"
    CommandName="Add"
    CommandArgument="None"
    OnCommand="SubmitBtn2_Click" 
    runat="server"
/>
<asp:ImageButton 
    id="butEdit"
    AlternateText="Edit Record"
    ImageURL="./edit.gif"
    CommandName="Edit"
    CommandArgument="None"
    OnCommand="SubmitBtn2_Click" 
    runat="server"
/>
<asp:ImageButton 
    id="butSortA"
    AlternateText="Sort A-Z"
    ImageURL="./sorta.gif"
    CommandName="Sort"
    CommandArgument="A"
    OnCommand="SubmitBtn2_Click" 
    runat="server"
/>
<asp:ImageButton 
    id="butSortD"
    AlternateText="Sort Z-A"
    ImageURL="./sortd.gif"
    CommandName="Sort"
    CommandArgument="D"
    OnCommand="SubmitBtn2_Click" 
    runat="server"
/>
</Font>
</Form>
</BODY>
</HTML>
           
       
Related examples in the same category
1. Determining the Coordinates Clicked on the Image of an ImageButton Control (VB.net)
2. Simple ImageButton control (VB.net)
3. For loop inside asp:ImageButton Click event (VB.net)
4. Set ImageUrl for asp:Image (VB.net)
5. Use Image Button event (VB.net)
6. Deal with button action event arguments: x, y coordinates (C#)
7. Get Image Button mouse cursor coordinates (C#)
w__w___w._j__a__v__a___2___s_._c___om__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.