这是我的代码:如何显示按升序复选框选中的项目
protected void check1_SelectedIndexChanged(object sender, EventArgs e)
{
for (int i = 0; i < check1.Items.Count; i++)
{
if (check1.Items[i].Selected)
{
comment.Text = "\u2022 "+check1.Items[i].Text +"<br/>"+ comment.Text;
}
}
}
例如,如果我有复选框列表:
*apple
*Mango
*Orange
*Grapes
和我有选定的苹果,橙和葡萄,它显示为
grapes
orange
apple
我希望它显示为:
apple
orange
grapes
您使用,列表框或什么哪个控制? – 2012-07-23 19:03:42