Asp.Net and SQL SERVER
My learning and thoughts
Friday, February 19, 2010
Copy a ListBox Items to Another ListBox
private void CopyAListItemToAnotherListItem()
{
ArrayList al = new ArrayList();
for (int i = 97; i < 105; i++)
{
al.Add(Convert.ToChar(i));
}
ListBox1.DataSource = al;
ListBox1.DataBind();
ListBox2.Items.AddRange(ListBox1.Items.Cast
().ToArray());
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment