I have an arraylist in which I store some values
ArrayList a = new ArrayList();
whenever an event takes place on a button (i.e. when user clicks the button), it's particular function is called :
public void button1_clicked(Object sender, EventArgs e)
and I try to store values in the listbox i made in aspx file :
for (int i = 0; i < list1.Count; i++)
{
ListBox1.Items.Add(a.ToString());
}
it doesnot add items to the listbox ListBox1
it even simple doesn't add "hello world " to the listbox :
ListBox1.Items.Add("hello world ");
whats the reason? what sould I do ? I searched net everywhere but there's simply the code of how to add items to the listbox like I did....but i dont get them added to it !...
ArrayList a = new ArrayList();
whenever an event takes place on a button (i.e. when user clicks the button), it's particular function is called :
public void button1_clicked(Object sender, EventArgs e)
and I try to store values in the listbox i made in aspx file :
for (int i = 0; i < list1.Count; i++)
{
ListBox1.Items.Add(a.ToString());
}
it doesnot add items to the listbox ListBox1
it even simple doesn't add "hello world " to the listbox :
ListBox1.Items.Add("hello world ");
whats the reason? what sould I do ? I searched net everywhere but there's simply the code of how to add items to the listbox like I did....but i dont get them added to it !...
