ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources]

G. andrew Duthie; matthew Macdonald

نسخه متنی -صفحه : 873/ 747
نمايش فراداده

DataListCommandEventArgs

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

The DataListCommandEventArgs class provides more information for the ItemCommand, CancelCommand, DeleteCommand, EditCommand, and UpdateCommand events of the DataList control. This information consists of an Item property identifying the affected DataListItem, and a CommandSource property that refers to the button or hyperlink that was clicked. You will have to cast this object to an appropriate type to read its properties.

public sealed class 

DataListCommandEventArgs : CommandEventArgs { // Public Constructors public

DataListCommandEventArgs (DataListItem

item , object

commandSource , CommandEventArgs

originalArgs ); // Public Instance Properties public object

CommandSource {get; } public DataListItem

Item {get; } }

Hierarchy

System.Object System.EventArgs CommandEventArgs DataListCommandEventArgs

Passed To

DataList.{OnCancelCommand( ), OnDeleteCommand( ), OnEditCommand( ), OnItemCommand( ), OnUpdateCommand( )}, DataListCommandEventHandler.{BeginInvoke( ), Invoke( )}