DataTable dt5 = new DataTable(); dt5.Columns.Add("Data", typeof(string)); DataRow dr = dt5.NewRow(); ArrayList ary = new ArrayList(); foreach (Control ctr in dynamic.Controls) { if (ctr is TextBox) { string IDs = ((TextBox)ctr).ID; string values = ((TextBox)ctr).Text; string text= values; ele = (new XElement(IDs, values)); ary.Insert(0, ele) ; } } dr[0] = ary; dt5.Rows.Add(dr);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)