CommandEventArgs Constructor (CommandEventArgs)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Initializes a new instance of the CommandEventArgs class with another CommandEventArgs object.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public CommandEventArgs(
	CommandEventArgs e
)

Parameters

e
Type: System.Web.UI.WebControls.CommandEventArgs

A CommandEventArgs that contains the event data.

Use this constructor to create and initialize a new instance of the CommandEventArgs class using the specified CommandEventArgs object.

When an instance of CommandEventArgs is created by a call to this constructor, the following properties are initialized to the specified values.

Property

Initial Value

CommandName

The e.CommandName parameter.

CommandArgument

The e.CommandArgument parameter.

The following example demonstrates how to create and initialize a new instance of the CommandEventArgs class using the specified CommandEventArgs object.

void Command_Button_Click(Object sender, CommandEventArgs e) 
{
    CommandEventArgs args = new CommandEventArgs(e);    
}

.NET Framework
Available since 1.1
Return to top
Show: