Szerkesztés

Megosztás a következőn keresztül:


MenuEventArgs Constructors

Definition

Initializes a new instance of the MenuEventArgs class.

Overloads

MenuEventArgs(MenuItem)

Initializes a new instance of the MenuEventArgs class using the specified menu item.

MenuEventArgs(MenuItem, Object, CommandEventArgs)

Initializes a new instance of the MenuEventArgs class using the specified menu item, command source, and event arguments.

MenuEventArgs(MenuItem)

Initializes a new instance of the MenuEventArgs class using the specified menu item.

public:
 MenuEventArgs(System::Web::UI::WebControls::MenuItem ^ item);
public MenuEventArgs (System.Web.UI.WebControls.MenuItem item);
new System.Web.UI.WebControls.MenuEventArgs : System.Web.UI.WebControls.MenuItem -> System.Web.UI.WebControls.MenuEventArgs
Public Sub New (item As MenuItem)

Parameters

item
MenuItem

For the MenuItemClick event, this parameter represents the menu item clicked by the user. For the MenuItemDataBound event, this parameter represents the menu item being bound to data.

Remarks

Use this constructor to create a new instance of the MenuEventArgs class from the specified menu item. The following table shows initial property values for an instance of the MenuEventArgs class.

Property Initial value
CommandArgument null
CommandName Empty
CommandSource null
Item The MenuItem object specified by the item parameter.

See also

Applies to

MenuEventArgs(MenuItem, Object, CommandEventArgs)

Initializes a new instance of the MenuEventArgs class using the specified menu item, command source, and event arguments.

public:
 MenuEventArgs(System::Web::UI::WebControls::MenuItem ^ item, System::Object ^ commandSource, System::Web::UI::WebControls::CommandEventArgs ^ originalArgs);
public MenuEventArgs (System.Web.UI.WebControls.MenuItem item, object commandSource, System.Web.UI.WebControls.CommandEventArgs originalArgs);
new System.Web.UI.WebControls.MenuEventArgs : System.Web.UI.WebControls.MenuItem * obj * System.Web.UI.WebControls.CommandEventArgs -> System.Web.UI.WebControls.MenuEventArgs
Public Sub New (item As MenuItem, commandSource As Object, originalArgs As CommandEventArgs)

Parameters

item
MenuItem

For the MenuItemClick event, this parameter represents the menu item clicked by the user. For the MenuItemDataBound event, this parameter represents the menu item being bound to data.

commandSource
Object

The Object that raised the event.

originalArgs
CommandEventArgs

A CommandEventArgs that contains the command name and command argument values for the menu item.

Remarks

Use this constructor to create a new instance of the MenuEventArgs class from the specified menu item, command source, and event arguments. The following table shows initial property values for an instance of the MenuEventArgs class.

Property Initial value
CommandArgument The value of the originalArgs.CommandArgument parameter.
CommandName The value of the originalArgs.CommandName parameter.
CommandSource The Object specified by the commandSource parameter.
Item The MenuItem object specified by the item parameter.

See also

Applies to