DataTable table = new DataTable(); DataColumn col1 = new DataColumn("Name"); DataColumn col2 = new DataColumn("Username"); col1.DataType = System.Type.GetType("System.String"); col2.DataType = System.Type.GetType("System.String"); table.Columns.Add(col1); table.Columns.Add(col2); DataRow row = table.NewRow(); row[col1] = "John"; row[col2] = "John123"; table.Rows.Add(row); GridView gv = new GridView(); gv.DataSource = table; gv.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)