Problems with list<T> in Asp.Net c#
<p>I'm making a web app in Asp.Net using c# that lets you add items into the list.</p>

<p>My problem is that each time that i click the button to add a new item into the list , its just shows me the last item and the list counter shows me only 1 .</p>

<p>What am I doing wrong??</p>

<p>Here is the code : </p>

<pre><code>public partial class home : System.Web.UI.Page
{
 List&lt;string&gt; messageboxs = new List&lt;string&gt;();
 public string val = "";
 public string data = "";

 protected void Button1_Click(object sender, EventArgs e)
 {
    val = "";
    messageboxs.Add(text1.Text);
    ListBox1.DataSource = messageboxs;
    ListBox1.DataBind();
    val = messageboxs.Count.ToString();
 }
}
</code></pre>
