Hi , I'm programming a paging code in a repeater but i faced a problem :
'' System.InvalidOperationException: The DataSource and DataSourceID are both set to 'Repeater3'. Remove one definition. ''
here's my code where the problem exist
Public Sub bindrepeater()
Dim con As New SqlConnection("Data Source=localhost;Initial Catalog=parapharmacie;Integrated Security=True")
Dim com As New SqlCommand("sp_pag", con)
com.CommandType = CommandType.StoredProcedure
com.Parameters.Add("@pg", SqlDbType.Int).Value = Convert.ToInt16(txtHidden.Value)
com.Parameters.Add("@pgSize", SqlDbType.Int).Value = 4
Dim da As New SqlDataAdapter()
da.SelectCommand = com
Dim ds As New DataSet()
da.Fill(ds)
Repeater3.DataSource = ds
Repeater3.DataBind()
End Sub