ASP.NEt DataTableToArrayList
private static ArrayList DataTableToArrayList(DataTable dt) { ArrayList array = new ArrayList(); for (int i = 0; i < dt.Rows.Count; i++) { DataRow row = dt.Rows[i]; Hashtable Ht= new Hashtable(); for (int j = 0; j < dt.Columns.Count; j++) { object cellValue = row[j]; if (cellValue.GetType() == typeof(DBNull)) { cellValue = null; } Ht[dt.Columns[j].ColumnName] = cellValue; } array.Add(Ht); } return array; }