<%@ Page Language="C#" AutoEventWireup="True" %>
<html>
	<head>
		<script language="C#" runat="server">
		void LinkButton_Command(Object sender, CommandEventArgs e) {
			lblSaida.Text = "Item selecionado: " + e.CommandName + "=" + e.CommandArgument;
		}
		</script>
	</head>
	<body>
		<form id="Form1" runat=server>
			<h4>Exemplo com o evento Command do controle LinkButton (clique nos links).</h4>
			<asp:LinkButton id="LinkButton1"
				Text="Pedido 201"
				CommandName="Pedido"
				CommandArgument="201"
				OnCommand="LinkButton_Command"
			runat="server"/>
			<br>
			<asp:LinkButton id="LinkButton2"
				Text="Pedido 202"
				CommandName="Pedido"
				CommandArgument="202"
				OnCommand="LinkButton_Command"
			Runat="server"/>
			<p>
			<asp:Label id="lblSaida" runat="server"/>
		</form>
	</body>
</html>

