| Author: suman 25 Jul 2008 | Member Level: Gold | Rating: Points: 4 |
protected void Button1_Click(object sender, EventArgs e) { if (ListBox1.Items.Count == 1) { Label1.Text = "list box contains only one value"; } else { Label1.Text = "list box contains more than one value"; } }
|
| Author: Gaddamchandrakanth 25 Jul 2008 | Member Level: Silver | Rating: Points: 3 |
Hi, Please check this once.
if(lstbox.items.count >1) { lblMessage.Text = "List box Contains more than one Value"); } else { lblMessage.Text = "List box Contains only one Value"); }
Thanks and Regards Chandrakanth
|