<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">    
    protected void Button1_Click(object sender, EventArgs e)
    {
        for (int i = 0; i < CheckBoxList1.Items.Count; i++)
        {
            if (CheckBoxList1.SelectedIndex > -1)
            {
                CheckBoxList1.Items.RemoveAt(CheckBoxList1.SelectedIndex);
            }
        }
    }

    protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        for (int i = 0; i < CheckBoxList1.Items.Count; i++)
        {
            if (CheckBoxList1.SelectedIndex > -1)
            {
                Label1.Text = "Você selecionou: " + CheckBoxList1.SelectedItem.Text;
            }
        }
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            onselectedindexchanged="CheckBoxList1_SelectedIndexChanged" 
            AutoPostBack="True">
            <asp:ListItem>Inglês</asp:ListItem>
            <asp:ListItem>Espanhol</asp:ListItem>
            <asp:ListItem>Alemão</asp:ListItem>
            <asp:ListItem>Francês</asp:ListItem>
            <asp:ListItem>Italiano</asp:ListItem>            
        </asp:CheckBoxList>
    </div>
    <br />
    <asp:Button ID="Button1" runat="server" Text="Exibir" OnClick="Button1_Click" />
    <br />
    <br />
    <asp:Label ID="Label1" runat="server"></asp:Label>
    </form>
</body>
</html>
