Assembly: System.Web.Mobile (in System.Web.Mobile.dll)
When you create a delegate for a List control, you identify the method that will handle the event. The ListControl 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.
For default rendering, the control provides a UI that allows the user to click individual list items. On postback, the control calls the OnItemCommand event handler, with an argument pointing to the source item. The value of the CommandName property is null.
When rendering with a template, the event bubbling mechanism of ASP.NET calls the OnItemCommand method. The event handler is passed a parameter, pointing to the source item, and to the CommandName property of the control that generated the event. This allows you to render a single list item with multiple associated interactions.
To render an item as a hyperlink, you can set the ItemsAsLinks property to true. The value of the Text property is used for display, and the contents of the Value property are used as the target link address when selected.
Command events will not be generated for these links.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.