How to: Respond to User Clicks in BulletedList Web Server Controls
You can configure a BulletedList control to display LinkButton controls as the bulleted list items. When users click a button, the control posts the page back to the server and gives you an opportunity to run code in response to the click.
To respond to a user click in a BulletedList Web server control
-
In Design view, double-click the BulletedList control and then add a handler for the BulletedList control's Click event.
-
In the event handler, get the Index property of the BulletedListEventArgs value passed to the handler.
-
Using the index, get the appropriate item from the control and then get the item's Text and Value properties.
The following code example shows a Click event handler for a BulletedList control. The handler displays which list item the user clicked.
Show: