Sorry for not supplying any information. You are suppose to know what I am doing. Right?
Heres some code that I use to populate my datagrid. I am also using VB. Think this will be enough to give you an idea of what I am doing. Thanks.
Sub Page_Load(Src As Object, E As EventArgs)
Dim ConnectString As String
MyConnect = New SqlConnection
connectString = ConfigurationSettings.AppSettings("ConnectStr")
MyConnect.ConnectionString = ConnectString
If Not IsPostBack Then
BindGrid()
End If
End Sub
public Sub BindGrid()
Dim MyCommand As SqlDataAdapter = New SqlDataAdapter ("Select * " _
& "From Users", MyConnect)
Dim ds As DataSet = New DataSet()
MyCommand.Fill(ds)
MyDataGrid.DataSource=ds
MyDataGrid.DataBind()
End Sub