Private Sub FillDataList()
Try
Dim strConString As String = String.Empty
Dim SqlQuery As String = String.Empty
Dim sqlda As SqlDataAdapter
Dim SqlDs As New DataSet
strConString = System.Configuration.ConfigurationManager.ConnectionStrings("CnString").ConnectionString
SqlQuery = "SELECT TOP 6 * FROM SampleTable"
sqlcon = New SqlConnection(strConString)
sqlcmd = New SqlCommand(SqlQuery, sqlcon)
sqlda = New SqlDataAdapter(sqlcmd)
sqlcon.Open()
sqlda.Fill(SqlDs, "Stf")
DataList1.DataSource = SqlDs.Tables(0)
DataList1.DataBind()
sqlcon.Close()
sqlcmd.Dispose()
sqlcon.Dispose()
Catch ex As Exception
lblMsg.Text = ex.ToString()
End Try
End Sub