CommandEventArgs

CommandEventArgs

System.Web.UI.WebControls (system.web.dll)class

This class is used by the CommandEventHandler to provide extra information to a Command event handler. This information is stored in two properties: CommandName and CommandArgument, which are both strings. These properties are used only by your code, and can thus be used to store any information you need. For example, you might set CommandName to "Sort" and CommandArgument to "Ascending."

public class CommandEventArgs : EventArgs {
// Public Constructors
   public CommandEventArgs(CommandEventArgs e);
   public CommandEventArgs(string commandName, object argument);
// Public Instance Properties
   public object CommandArgument{get; }
   public string CommandName{get; }
}

Hierarchy

System.Object System.EventArgs CommandEventArgs

Subclasses

DataGridCommandEventArgs, DataListCommandEventArgs, RepeaterCommandEventArgs, System.Web.UI.MobileControls.{ListCommandEventArgs, ObjectListCommandEventArgs}

Passed To

System.Web.UI.MobileControls.Command.OnItemCommand( ), System.Web.UI.MobileControls.ListCommandEventArgs.ListCommandEventArgs( ), System.Web.UI.MobileControls.ObjectListCommandEventArgs.ObjectListCommandEventArgs( ), Button.OnCommand( ), CommandEventHandler.{BeginInvoke( ), Invoke( )}, DataGridCommandEventArgs.DataGridCommandEventArgs( ), DataListCommandEventArgs.DataListCommandEventArgs( ), ImageButton.OnCommand( ), LinkButton.OnCommand( ), RepeaterCommandEventArgs.RepeaterCommandEventArgs( )



    Part I: Introduction to ASP.NET
    Part III: Namespace Reference
    Chapter 40. The System.Web.UI.MobileControls Namespace
    Chapter 42. The System.Web.UI.WebControls Namespace