0
Answer

How I can store data using TextBox at runtime in c#

Ask a question
Vishal Pandey

Vishal Pandey

18y
2.1k
1
I,m creating some textbox at runtime .

int i =0;

if (datared["object type text"].ToString().ToUpper() == "TEXT" )

{  

i++;

TextBox t1 = new TextBox();

t1.ID = "t" + i;

this.form1.Controls.Add(t1);

HtmlTableCell Celltxt = new HtmlTableCell();

this.form1.Controls.Add(Celltxt);

Celltxt.Controls.Add(t1);

//Celltxt.Controls.Add(ADD);

Rowtxt.Cells.Add(Celltxt);

}// End Text
      
  i,m not able that how i can add record in database if i create textbox at runtime.