How to: Respond to User Clicks in BulletedList Web Server Controls
.NET Framework 3.0
You can configure a BulletedList control to display buttons for the control's 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 user's click.
To respond to a user click in a BulletedList Web server control
-
Create an event 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 get the item's Text and Value properties.
Example
The following code example shows a page containing a BulletedList control that displays static items. The handler for the control's Click event displays which list item the user clicked.
See Also
Community Additions
ADD
Show: