ASP.NET Guestbook - Viewing Guestbook: viewcomments.aspx (Page 6 of 8 )
The guestbook feature is incomplete without allowing the users to view it. This page lets the users view your guestbook. This page consists of only one visual control and that is DataList. Create the data connection as said before in the pagecomments .aspx page. If everything goes correctly, we will be having a SqlConnection1,SqlDataAdapter1 controls on the component tray. Right click the SqlDataAdapter1 and click “Generate the Dataset”.
DataList
Drag and drop the DataList control. Set the properties as given below.

Enter the following inside page_load subroutine
Private Sub Page_Load
(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Line1: SqlDataAdapter1.Fill(DataSet11)
Line2: DataList1.DataBind()
End Sub
Line 1: Fills the dataset using adapter’s fill method
Line 2: Binds the datalist with the database mentioned in the property pages.
Next: Changing the ASP:DATALIST tag >>
More ASP.NET Code Articles
More By R. Abhiram Vikrant