Convert DataTabel to Json in Asp.net
Convert DataTabel to Json in Asp.net protected void Page_Load( object sender, EventArgs e) { DataTable dt = DtTable(); string change = ReturnJSON (dt); } public DataTable DtTable() { DataTable table = new DataTable () { TableName = "Customer" }; DataColumn keyColumn = table.Columns.Add( "Id" , typeof (System. Int32 )); table.Columns.Add( "Name" , typeof (System. String )); table.Columns.Add( "Address" , typeof (System. String )); table.PrimaryKey = new DataColumn [] { keyColumn }; table.Rows.Add( ...