I have question, that maybe someone here wouldn\'t mind to help me with. I have lets say 3 datatables, each one of them has the following columns:
size, quantity, amo
use this function:
public static string ConvertDataTableToHTML(DataTable dt)
{
string html = "<table>";
//add header row
html += "<tr>";
for(int i=0;i<dt.Columns.Count;i++)
html+="<td>"+dt.Columns[i].ColumnName+"</td>";
html += "</tr>";
//add rows
for (int i = 0; i < dt.Rows.Count; i++)
{
html += "<tr>";
for (int j = 0; j< dt.Columns.Count; j++)
html += "<td>" + dt.Rows[i][j].ToString() + "</td>";
html += "</tr>";
}
html += "</table>";
return html;
}
As per my understanding you need to show 3 tables data in one html table using asp.net with c#.
I think best you just create one dataset with 3 DataTable object.
Bind that dataset to GriView directly on page load.