|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
CommandEventArgs Classe
Assembly: System.Web (em System.Web. dll)
<%@ Page Language= AutoEventWireup= %>
<!DOCTYPE html PUBLIC "-
"http:
<html xmlns="http:
<head runat=>
<title>Button CommandName Example</title>
<script runat=>
CommandBtn_Click(Object sender, CommandEventArgs e)
{
(e.CommandName)
{
:
Sort_List((String)e.CommandArgument);
;
:
Message.Text = ;
((String)e.CommandArgument == )
{
Message.Text += ;
}
{
Message.Text += ;
}
;
:
Message.Text = ;
;
}
}
Sort_List(string commandArgument)
{
(commandArgument)
{
:
Message.Text = ;
;
:
Message.Text = ;
;
:
Message.Text = ;
;
}
}
</script>
</head>
<body>
<form id= runat=>
<h3>Button CommandName Example</h3>
Click one of the command buttons.
<br /><br />
<asp:Button id=
Text=
CommandName=
CommandArgument=
OnCommand=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
OnCommand=
runat=/>
<br /><br />
<asp:Button id=
Text=
CommandName=
OnCommand=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
OnCommand=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
OnCommand=
runat=/>
<br /><br />
<asp:Label id= runat=/>
</form>
</body>
</html>
<%@ Page Language= AutoEventWireup= %>
<!DOCTYPE html PUBLIC "-
"http:
<html xmlns="http:
<head runat=>
<title>Button CommandName Example</title>
<script runat=>
CommandBtn_Click(Object sender, CommandEventArgs e)
{
(e.CommandName)
{
:
Sort_List((String)e.CommandArgument);
;
:
Message.Text = ;
((String)e.CommandArgument == )
{
Message.Text += ;
}
{
Message.Text += ;
}
;
:
Message.Text = ;
;
}
}
Sort_List(string commandArgument)
{
(commandArgument)
{
:
Message.Text = ;
;
:
Message.Text = ;
;
:
Message.Text = ;
;
}
}
Page_Load(Object sender, EventArgs e)
{
Button1.Command += CommandEventHandler(.CommandBtn_Click);
Button2.Command += CommandEventHandler(.CommandBtn_Click);
Button3.Command += CommandEventHandler(.CommandBtn_Click);
Button4.Command += CommandEventHandler(.CommandBtn_Click);
Button5.Command += CommandEventHandler(.CommandBtn_Click);
}
</script>
</head>
<body>
<form id= runat=>
<h3>Button CommandName Example</h3>
Click one of the command buttons.
<br /><br />
<asp:Button id=
Text=
CommandName=
CommandArgument=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
runat=/>
<br /><br />
<asp:Button id=
Text=
CommandName=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
runat=/>
<asp:Button id=
Text=
CommandName=
CommandArgument=
runat=/>
<br /><br />
<asp:Label id= runat=/>
</form>
</body>
</html>
- AspNetHostingPermission
Para operar em um ambiente hospedado. Exigem valor: LinkDemand; Permission value: Minimal. - AspNetHostingPermission
Para operar em um ambiente hospedado. Exigem valor: InheritanceDemand; Permission value: Minimal.
System.Object
System.Web.UI.WebControls.CommandEventArgs
System.Web.UI.MobileControls.ListCommandEventArgs
System.Web.UI.MobileControls.ObjectListCommandEventArgs
System.Web.UI.WebControls.DataGridCommandEventArgs
System.Web.UI.WebControls.DataListCommandEventArgs
System.Web.UI.WebControls.DetailsViewCommandEventArgs
System.Web.UI.WebControls.FormViewCommandEventArgs
System.Web.UI.WebControls.GridViewCommandEventArgs
System.Web.UI.WebControls.MenuEventArgs
System.Web.UI.WebControls.RepeaterCommandEventArgs