Master / Details using ASP.NET Webform

This short article shows you how to create Master / Details Webform.

Prerequisites:

·         A database with a table named review.

·         Create ASP.NET Webform

1. Drag a GridView control from ToolBox to your Webform.

2. Drag a SqlDataSource control from ToolBox to your Webform.

4. Configure a SqlDataSource for example SqlDataSource1 to point to the review table.

5. Point your GridView control data source to SqlDataSource1.

6. Drag DetailsView control from ToolBox to your Webform.

7.  User left click on “Choose Data Source: (drop down button)” in “DetailsView”.

8. User left click on “<New data source…> (list item)”.

9. User left click on “Database (list item)” in “Data Source Configuration Wizard“.

10. User left click on “Which data connection should your application use to connect to the database? (combo box)” in “Configure Data Source – SqlDataSource2”.

image

11. User left click on “ConnectionString (list item)”. Click New Connection… if you don’t have one.

image

12. User left click on “Next > (push button)” in “Configure Data Source – SqlDataSource2”

image

13. User left click on “Name: (combo box)” in “Configure Data Source – SqlDataSource2”.

14. User left click on “Reviews (list item)”.

image

15. User left click on “Next > (push button)” in “Configure Data Source – SqlDataSource2”.

image

16. User left click on “Advanced… (push button)” in “Configure Data Source – SqlDataSource2”.

image

17. User left click on “Generate INSERT, UPDATE, and DELETE statements (check box)” in “Advanced SQL Generation Options”.

image

18. User left click on “OK (push button)” in “Advanced SQL Generation Options”.

image

19. User left click on “WHERE… (push button)” in “Configure Data Source – SqlDataSource2”.

image

20. User left click on “Column: (combo box)” in “Add WHERE Clause”.

image

21. User left click on “ReviewID (list item)”.

image

22. User left click on “Source: (combo box)” in “Add WHERE Clause”.

image

23. User left click on “Control (list item)”.

image

24. User left click on “Control ID: (combo box)” in “Add WHERE Clause”.

25. User left click on “GridView1 (list item)”.

image

26. User left click on “Add (push button)” in “Add WHERE Clause”.

image

27. User left click on “OK (push button)” in “Add WHERE Clause”.

image

28. User left click on “Next > (push button)” in “Configure Data Source – SqlDataSource2”.

image

29. User left click on “Finish (push button)” in “Configure Data Source – SqlDataSource2”.

image

About chanmingman

Since March 2011 Microsoft Live Spaces migrated to Wordpress (http://www.pcworld.com/article/206455/Microsoft_Live_Spaces_Moves_to_WordPress_An_FAQ.html) till now, I have is over 1 million viewers. This blog is about more than 50% telling you how to resolve error messages, especial for Microsoft products. The blog also has a lot of guidance teaching you how to get stated certain Microsoft technologies. The blog also uses as a help to keep my memory. The blog is never meant to give people consulting services or silver bullet solutions. It is a contribution to the community. Thanks for your support over the years. Ming Man is Microsoft MVP since year 2006. He is a software development manager for a multinational company. With 25 years of experience in the IT field, he has developed system using Clipper, COBOL, VB5, VB6, VB.NET, Java and C #. He has been using Visual Studio (.NET) since the Beta back in year 2000. He and the team have developed many projects using .NET platform such as SCM, and HR based applications. He is familiar with the N-Tier design of business application and is also an expert with database experience in MS SQL, Oracle and AS 400.
This entry was posted in .Net, Community and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s