Hi All,
In my application i have created textboxes based on user requirement at runtime.
Here,
How can i retrieve that data from that textboxes & how can i save it into database..
How to save the data in to database from textboxes which is created at runtime
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Vishal JadavRank #1,692 · 901 reputationPosted Jan 30, 2012, 10:04 PM EST
are u using foreach for retriving the data from control on the your form or from any container control.
like.
foreach(Control c in this.Controls)
{
if(c.GetType().ToString() == "System.Windows.Form.Controls.TextBox")
{
((System.Windows.Form.Controls.TextBox)c).Text = c.Name;
}
}
in the same way u can retreive the value and insert them into to ur table .
it might help u.,.