Skip to main content

Displaying Data on a Page

  • Chapter
Book cover Beginning ASP.NET 2.0 Databases
  • 233 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics