getting text from dynamiclly created texbox
<p>I'm trying to  make windows app to calculate GPA . the user can enter the number of subjects and the app create textboxes as many as the number of subjects . but i can't get the values from textboxes . and this is the code I'm trying</p>

<pre><code>private void button1_Click(object sender, EventArgs e)
    {
        for (int i = 0; i &lt; int.Parse(textBox1.Text); i++)
        {
            Label supjects = new Label();
            supjects.Text = "supject " + (i+1) ;
            supjects.Location = new System.Drawing.Point(60, 70+i*41);
            supjects.Name = "supject" + i;
            this.Controls.Add(supjects);

            TextBox fullMark = new TextBox();
            fullMark.Location = new System.Drawing.Point(162, 70 + i * 41);
            fullMark.Size=new System.Drawing.Size(57, 24);
            fullMark.Name = "fullMark" + i;
            this.Controls.Add(fullMark);

            TextBox yourMark = new TextBox();
            yourMark.Location = new System.Drawing.Point(272, 70 + i * 41);
            yourMark.Size = new System.Drawing.Size(57, 24);
            yourMark.Name = "yourMark" + i;
            this.Controls.Add(yourMark);


        }
</code></pre>