============================================== HTML of Datalist ==============================================
> |
=============================================== Server Side Coding : VB.NET =============================================== Dim Start As IntegerDim dbCon As SqlConnectionDim Adpt As SqlDataAdapterDim dtUser As DataSetPrivate Sub Page_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.LoadIf Not Page.IsPostBack ThenViewState(“Start”) = 0BindData()End IfEnd SubSub BindData()dbCon = New SqlConnection(“server=localhost;uid=sa;pwd=;database=user”)Adpt = New SqlDataAdapter(“Select * from user “, dbCon)dtUser = New DataSetStart = ViewState(“Start”)ViewState(“Size”) = 14Adpt.Fill(dtUser, Start, ViewState(“Size”), “user”)dsList.DataSource = dtUserdsList.DataBind()End SubPrivate Sub lnkPrevious_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles lnkPrevious.ClickStart = ViewState(“Start”)- ViewState(“Size”)ViewState(“Start”) = StartIf Start