Summary
This chapter covered quite a lot of ground. You’ve learned about the following:
-
You were introduced to the GridView and SqlDataSource, and through the course of the examples, saw how easy it is to build data-driven pages with a minimum of code.
-
You were introduced to the SELECT query by writing a simple query for one table.
-
You expanded your understanding of the SELECT query by looking at ordering results and joining tables to retrieve information from both tables in the same query.
-
You looked at filtering the results that you returned by using parameters with values taken from other Web controls on the page.
-
You looked at the comparison and logical operators you can use with the WHERE clause and saw the IN and BETWEEN operators you can use to simplify the constraints that you add to queries.
-
You looked at the connection strings that are required for the SQL Server 2005, MySQL 5.0, and Microsoft Access databases, and saw how to store all three connection strings in the <connectionStrings> element of Web.config.
-
You saw that SQL Server 2005 supports the concept of named parameters where the same parameter can be used several times in the same query. With MySQL 5.0 and Microsoft Access, you need to provide a separate value for each parameter within the query, even if you want to reuse the same parameter.
Now that you’ve had a taste of how data-driven pages work, we’ll move on to look at how you can connect to the database using code, rather than relying on the SqlDataSource to do all of the work for you.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Damien Foggon
About this chapter
Cite this chapter
(2006). Displaying Data on a Page. In: Beginning ASP.NET 2.0 Databases. Apress. https://doi.org/10.1007/978-1-4302-0146-5_3
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0146-5_3
Publisher Name: Apress
Print ISBN: 978-1-59059-577-0
Online ISBN: 978-1-4302-0146-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books