ListDataBindEventHandler 委托

定义

警告

此 API 现已过时。

表示处理 ItemDataBind 控件的 List 事件的方法。Represents the method that handles the ItemDataBind event of a List control. 若要了解如何开发 ASP.NET 移动应用,请参阅 ASP.NET 移动应用和网站For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public delegate void ListDataBindEventHandler(System::Object ^ sender, ListDataBindEventArgs ^ e);
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see https://go.microsoft.com/fwlink/?LinkId=157231.")]
public delegate void ListDataBindEventHandler(object sender, ListDataBindEventArgs e);
type ListDataBindEventHandler = delegate of obj * ListDataBindEventArgs -> unit
Public Delegate Sub ListDataBindEventHandler(sender As Object, e As ListDataBindEventArgs)

参数

sender
Object

事件的源,即 ListThe source of the event, a List.

e
ListDataBindEventArgs

包含事件数据的 ListDataBindEventArgsA ListDataBindEventArgs that contains the event data.

继承
ListDataBindEventHandler
属性

注解

List 控件包含项的集合。A List control contains a collection of items. 这些项是 MobileListItem 类的。These items are of the MobileListItem class. 提供默认呈现时,List 控件使用其 Text 属性表示 MobileListItem 对象。When providing default rendering, the List control represents a MobileListItem object using its Text property. 在模板呈现中,模板可以呈现 MobileListItem 对象或关联的数据绑定对象的任何所需属性。In templated rendering, the template can render any desired property of a MobileListItem object or associated data-bound object.

List 控件创建 ListDataBindEventHandler 委托时,需要标识用于处理事件的方法。When you create a ListDataBindEventHandler delegate for a List control, you identify the method that handles the event. 生成项事件时,List 控件将通知处理程序。The List control notifies the handler when an item event is generated. 若要将事件与事件处理程序关联,请将该委托的一个实例添加到事件中。To associate the event with your event handler, add an instance of the delegate to the event. 除非移除了该委托,否则每当发生该事件时都会调用事件处理程序。Unless you remove the delegate, the event handler is called whenever the event occurs.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅