Simple ImageButton control (VB.net) : Image Button « Asp Control « ASP.Net






Simple ImageButton control (VB.net)

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)

End Sub
Sub SubmitBtn_Click(Sender As Object, E As ImageClickEventArgs)
  lblDataEntered.Text = "You entered:<BR>" _
      & txtName.Text & "<BR>" _
      & txtEmail.Text & "<BR>" _
      & txtPhone.Text
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Creating a Basic ImageButton Control</TITLE>
</HEAD>
<form runat="server">
<asp:label 
    id="lblDataEntered" 
    runat="server"
/>
<BR><BR>
Enter your Name:<BR>
<asp:textbox 
    id="txtName" 
    columns="25"
    maxlength="30"
    runat=server 
/>
<BR><BR>
Enter your Email Address:<BR>
<asp:textbox 
    id="txtEmail" 
    columns="35"
    maxlength="50"
    runat=server 
/>
<BR><BR>
Enter your Phone Number:<BR>
<asp:textbox 
    id="txtPhone" 
    columns="15"
    maxlength="15"
    runat=server 
/>
<BR><BR>
<asp:imagebutton 
    id="imagebutOK"
    alternatetext="Click to Submit"
    imageurl="http://www.java2s.com/style/logo.png"
    onclick="SubmitBtn_Click" 
    runat="server"
/>
</form>
</BODY>
</HTML>
           
       








Related examples in the same category

1.Determining the Coordinates Clicked on the Image of an ImageButton Control (VB.net)
2.asp:ImageButton AlternateText (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#)
8.Get position from ImageClickEventArgs
9.Link Javascript function to OnClientClick event