asp:button: command name and arguments (VB.net) : 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 » Button 
asp:button: command name and arguments (VB.net)

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

End Sub
Sub CommandButton_Click(Sender As Object, E As CommandEventArgs)
  lblButtonPressed.Text = "You pressed: " _
      & E.CommandName & "<BR>With this argument: " _
      & E.CommandArgument & "<BR>"
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Using a Button Control as a Command Button</TITLE>
</HEAD>
<form runat="server">
<asp:label 
    id="lblButtonPressed" 
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butSortName"
    text="Sort By Name"
    oncommand="CommandButton_Click"
    commandname="Sort"
    commandargument="By Name"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="butSortPrice"
    text="Sort By Price"
    oncommand="CommandButton_Click"
    commandname="Sort"
    commandargument="By Price"
    runat="server"
/>
<BR><BR>
<asp:button 
    id="lnkbutNewSearch"
    text="New Search"
    oncommand="CommandButton_Click"
    commandname="New Search"
    commandargument="None"
    runat="server"
/>
</form>
</BODY>
</HTML>
           
       
Related examples in the same category
1. Event in code behind file (VB.net)
2. Event driven page (VB.net)
3. Set Button text (VB.net)
4. asp:button event to change the label text (VB.net)
5. Button action Command and Parameter (VB.net)
6. Add action listener to a server Button (VB.net)
7. asp button postbackurl (C#)
8. asp button on client click (C#)
9. Button counter: click and change button label (C#)
10. Add action listener to asp Button by delegate (C#)
11. Read input and do the calculation in Button action listener (C#)
12. Button event Handler (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.