Keep getting this error. Using ASP datagrid

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim connectionString As String = WebConfigurationManager.ConnectionStrings("connectionstring").ConnectionString
        Dim selectSQL As String = "SELECT * FROM checkInOut"
            Dim con As New SqlConnection(connectionString)
            Dim cmd As New SqlCommand(selectSQL, con)
            Dim adapter As New SqlDataAdapter(cmd)
            ' Fill the DataSet.
            Dim ds As New DataSet()
        adapter.Fill(ds, "checkInOut")
            ' Perform the binding.
        checkInOutGV.DataSource = ds
        checkInOutGV.DataBind()

        End Sub

Recommended Answers

check in your Markup file if checkInOutGV have already a DatasourceID set. If so, remove it.

Jump to Post

All 2 Replies

check in your Markup file if checkInOutGV have already a DatasourceID set. If so, remove it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.