asp.net.ph

BaseDataList.SelectedIndexChanged Event

System.Web.UI.WebControls Namespace   BaseDataList Class


Occurs when the item selected on the list changes between posts to the server.

[ VB ]
Public Event SelectedIndexChanged As EventHandler

[ C# ]
public event EventHandler SelectedIndexChanged;

[ C++ ]
public: __event EventHandler* SelectedIndexChanged;

In [ JScript ], you can handle the events defined by a class, but you cannot define your own.

Event Data

The method assigned to handle the event is passed an EventArgs object containing data related to the SelectedIndexChanged event.

Remarks

The SelectedIndexChanged event is raised whenever a different selection in a data listing control is posted to the server.

The SelectedIndexChanged event is typically used in conjunction with a command button whose CommandName property is set to select.

You can implement this command button in either of the following ways:

When the form is posted, the SelectedIndex and SelectedItem properties of the list are updated to refer to the item selected.

Example

The following example demonstrates how to specify a handler for the SelectedIndexChanged event to display the item selected from a DataList.

 Show me 

See Also

BaseDataList Members   Allowing Users to Select Items in a DataList Control   Allowing Users to Select Items in a DataGrid Control Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph