<%@ Page Language="VB"%>

<script runat="server">
    Protected Sub BulletedList1_Click(ByVal sender As Object, _
       ByVal e As System.Web.UI.WebControls.BulletedListEventArgs)
        
         Label1.Text = "Indeks wybranego elementu: " & e.Index & _
            "<br>Wartość wybranego elementu: " & _
            BulletedList1.Items(e.Index).Text
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Kontrolka serwerowa BulletedList</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:BulletedList ID="BulletedList1" runat="server" 
         OnClick="BulletedList1_Click" DisplayMode="LinkButton">
            <asp:ListItem>Stany Zjednoczone</asp:ListItem>
            <asp:ListItem>Wielka Brytania</asp:ListItem>
            <asp:ListItem>Finlandia</asp:ListItem>
            <asp:ListItem>Rosja</asp:ListItem>
            <asp:ListItem>Szwecja</asp:ListItem>
            <asp:ListItem>Estonia</asp:ListItem>
        </asp:BulletedList>
        <asp:Label ID="Label1" runat="server">
        </asp:Label>
    </form>
</body>
</html>
