This documentation is archived and is not being maintained.
CommandEventArgs Constructor
.NET Framework 1.1
Initializes a new instance of the CommandEventArgs class.
Overload List
Initializes a new instance of the CommandEventArgs class with another CommandEventArgs object.
[Visual Basic] Public Sub New(CommandEventArgs)
[C#] public CommandEventArgs(CommandEventArgs);
[C++] public: CommandEventArgs(CommandEventArgs*);
[JScript] public function CommandEventArgs(CommandEventArgs);
Initializes a new instance of the CommandEventArgs class with the specified command name and argument.
[Visual Basic] Public Sub New(String, Object)
[C#] public CommandEventArgs(string, object);
[C++] public: CommandEventArgs(String*, Object*);
[JScript] public function CommandEventArgs(String, Object);
Example
The following example demonstrates how to create and initialize a new instance of the CommandEventArgs class using the specified command name and argument.
[Visual Basic] Private Sub Command_Button_Click(sender As Object, e As CommandEventArgs) Dim args2 As New CommandEventArgs("Sort", "Descending") End Sub 'Command_Button_Click [C#] private void Command_Button_Click(Object sender, CommandEventArgs e) { CommandEventArgs args2 = new CommandEventArgs("Sort", "Descending"); } [C++] private: void Command_Button_Click(Object* /*sender*/, CommandEventArgs* /*e*/) { CommandEventArgs* args2 = new CommandEventArgs(S"Sort", S"Descending"); } [JScript] private function Command_Button_Click(sender : Object, e : CommandEventArgs) { var args2 : CommandEventArgs = new CommandEventArgs("Sort", "Descending"); }
See Also
CommandEventArgs Class | CommandEventArgs Members | System.Web.UI.WebControls Namespace
Show: