<script language="c#" runat="server">
void Page_Load(){
string msg="选的是"
if(list1.Items[0].Selected){
msg=msg+list1.Items[0].Text;
}
if(list1.Items[1].Selected){
msg=msg+list1.Items[1].Text;
}
if(list1.Items[2].Selected){
msg=msg+list1.Items[2].Text;
}
my.Text=msg;
}
</script>
<body>
<form runat="server" >
<p>
<asp:ListBox ID="list1" Font-Overline="true" SelectionMode="Multiple" runat="server">
<asp:ListItem Selected>美国</asp:ListItem>
<asp:ListItem >英国</asp:ListItem>
<asp:ListItem >意大利</asp:ListItem>
</asp:ListBox>
<input type="submit" value="提交" >
</p>
</form>
<p><asp:Label ID="my" runat="server" Font-Bold="true" ForeColor="#FF0000" />
</body>