Public Sub Page_Load (ByVal sender As System.Object, ByVal e As System.EventArgs) 'to bring up the system name portion dim myConnection As New SqlConnection (ConfigurationSettings.AppSettings ( "ConnectionString")) Dim myCommand As New SqlDataAdapter ( "select * from [ Department] ", myconnection)
DIM DS AS NEW DATASET () MyCommand.Fill (DS, "Department") 'Set the system name assignment to the system setting D_Name.DataSource = DS.TABLES ("Department") D_Name.DataTextField = "d_name" D_Name.DataValuefield = "D_ID" D_Name.Database () MyConnection.Close () End Sub