how to assign values to text box in start pause button method which was dynamically created in c sharp
public void btn_addtimer_Click(object sender, EventArgs e)
{
var panel1 = new Panel()
{
Size = new Size(500, 180),
Location = new Point(10, i),
BorderStyle = BorderStyle.FixedSingle
};
TextBox textseconds = new TextBox();
textseconds.Name = "txtseconds";
textseconds.Location = new Point(350, 50);
textseconds.KeyPress += textseconds_KeyPress;
panel1.Controls.Add(textseconds);
Button startpause = new Button();
startpause.Name = "btnstartpause";
startpause.Text = "Start";
startpause.Location = new Point(350, 80);
startpause.Click += btnstartpause_Click;
panel1.Controls.Add(startpause);
}