I know that sounds really weird, but I am fairly new to C# and I am hoping you guys can help me out.
I am looping thru a DataTable, then excute a qry and get the the result into a DataTable.
Works OK for one record, but as soon as there are more records, only the last record is in the DT, which makes sense, I just do not know how to fix it. I need to have all the records in the DT.
Here is my code, any suggestions are welcome....
DataTable dt = ml.getRegistration(); DataTable dt2 = new DataTable(); foreach (DataRow row in dt.Rows) { dt2 = ml.getRegistrationExport(row["ID"]); } GridView1.DataSource = dt2; GridView1.DataBind();
getRegistrationExportdo? Add the code for it.ml.GetRegistration()?