how can store dynamic text box value in database

Posted by Rajthakur334 under ASP.NET on 6/13/2012 | Points: 10 | Views : 1733 | Status : [Member] | Replies : 2
runtime user enter number of columns name and table name.for example user enter 5 then, 5 columns are created and one for Table Name textbox.
After then Runtime use Enter columns name and select drowpdownlist is datatype. now After user click the (Create Table in database)Button which store in database




Responses

Posted by: Jayakumars on: 9/30/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this


for (int i = 1; i <= Convert.ToInt32(txtc.Text); i++)
{
TextBox txt = new TextBox();
DropDownList ddl = new DropDownList();
txt.ID = "txt" + i;
ddl.ID = "ddl" + i;
ddl.Items.Add("Character");
ddl.Items.Add("numeric");
ddl.Items.Add("Datetime");
form1.Controls.Add(txt);
form1.Controls.Add(ddl);
}



Mark as Answer if its helpful to you

Rajthakur334, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/30/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

Rajthakur334, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response