Fill Literal with strings in Page_Load
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 + "<br/>"; // only last item in arraylist
//ListBox1.Items.Add((string)item); //Works corectly
}
};
}