Private void page_load (object sender, system.eventargs e) {// Place user code here to initialize page SQLCONNECTION DB = New SqlConnection ("Server = (local); uid = sa; pwd =; database = mycount"); SqlDataAdapter DP = New SqldataAdapter ("Select * from Subject", DB); Dataset DS = New DataSet (); DP.FILL (DS, "Table0");
DataGrid1.datasource = DS; DAGRID1.DATABIND ();
}