ASP.NET Code
  Home arrow ASP.NET Code arrow Page 6 - ASP.NET Guestbook
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET CODE

ASP.NET Guestbook
By: R. Abhiram Vikrant
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 318
    2004-03-17

    Table of Contents:
  • ASP.NET Guestbook
  • Viewing the Results
  • Setting Up the Drop Down Box
  • Connecting to the Database
  • Feeding the Database
  • Viewing Guestbook: viewcomments.aspx
  • Changing the ASP:DATALIST tag
  • Explanation of the Tags

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    ASP.Net Guestbook



    Enter the following inside page_load subroutine


    Private Sub Page_Load(ByVal sender As System.ObjectByVal e As System.EventArgsHandles 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.

    More ASP.NET Code Articles
    More By R. Abhiram Vikrant


     

    ASP.NET CODE ARTICLES

    - How to Use the ListBox Control in ASP.NET 2.0
    - How to Load XML Documents in ASP.NET 2.0
    - DataGrid Code
    - ASP.NET Guestbook
    - User Controls and Client Side Scripting
    - ASP.NET Programming with Microsoft's AS...
    - ASP.NET Basics (part 3): Hard Choices
    - ASP.NET Basics (part 2): Not My Type
    - ASP.NET Basics (part 1): Nothing But .Net
    - Directory Tree Browser
    - How to get the confirmation of Yes/No from a...
    - Complete example using custom errors and wri...
    - Paging Certain # records per page .NET style
    - General Methods of formatting and Subtractin...
    - .NET LinkButton web control





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT