Hello,
Pls would you advise, I am getting an arraylist from ascx to main aspx.
I am getting values correctly. If I add items into Listbox it fills correctly, but in the Literal there is only last one. Please advice what I am missing.
Many thanks
-------------------------------------------------------------------------------
protected void Page_Load(object sender, EventArgs e)
{
members.sendPageMessage += delegate(ArrayList message)
{
foreach (string item in message)
{
Literal1.Text = (string)item + "
"; // only last item in arraylist
//ListBox1.Items.Add((string)item); //Works corectly
}
};
}
Loading
VulpesPosted Nov 1, 2011, 12:16 PM
";
Radim MotyckaPosted Nov 2, 2011, 3:54 AM
VulpesPosted Nov 1, 2011, 12:28 PM
", (string[])message.ToArray(typeof(string)));