Access form elements
<p>I'm creating a multiform application in c#. I'm storing the values from the user in a List in form 1 and I want to access the same stored values of the same list in form 2...I m not able to access the stored values...The error I'm getting indicates that there are no values in the list which I'm accessing from form 2...Please help me out...</p>

<pre><code>public Form1() 
{ 
    InitializeComponent(); 
} 

public List&lt;string&gt; sub = new List&lt;string&gt;(); 
public int clickcounter = 1; 

public void additems() 
{ 
    sub.Add("Java"); 
    sub.Add("Web Technology"); 
    sub.Add("Software Engineering"); 
    sub.Add("Networks"); 
    sub.Add("ADO.net"); 
}

public void show() 
{ 
    int x = 10; 
    int y = 10; 
    int m = sub.Count; 

    for (int i = 0; i &lt; m; i++) 
    { 
        string name = "txtBox_" + (i + 1).ToString("00"); 
        TextBox txt = new TextBox(); 
        txt.Name = name; 
        this.Controls.Add(txt); 
        txt.Text = sub[i]; 
        txt.ReadOnly = true; 
        y += 20; 
        txt.Location = new Point(x, y); 
        txt.Width = 120; 
    } 
}

private void button1_Click(object sender, EventArgs e) 
{ 
    if (clickcounter == 1) 
    { 
        additems(); 
        show(); 
    }
}
</code></pre>
