Chapter 3. Data Source Controls and Data Binding
One of the features of ASP.NET 1.0 that so excited developers was the introduction of server-side data binding. This had probably the greatest effect of all the new features in reducing the code required to build data-driven pages, when compared with previous versions of ASP (and other dynamic Web page technologies). No longer do you need to write masses of intermingled markup, literal text, and code to build HTML tables in your pages to display data. And, as an added advantage, data binding usually provides improved performance as well.ASP.NET 2.0 continues the process of reducing the requirements for code and developer effort. It provides new controls that remove the need to write those almost identical chunks of data access code that fetch the data you need from the data store. And it also considerably simplifies the previously cumbersome syntax for server-side data binding.In this chapter and the next, we look at the main areas where ASP.NET 2.0 changes the data access, data binding, and data output models used in ASP.NET 1.x. In this chapter we'll cover the following:An overview of "code-free" data binding and data updating techniquesThe new data source controls that expose data without requiring any data access code
There is also a new feature in the .NET Framework that can be useful when working with data in your Web pages and applications: a facility to add data source connection strings to a new section of a web.config file, which allows them to be encrypted for security purposes. This topic is covered, along with other configuration topics, in Chapter 13.Meanwhile, we start off in this chapter with a brief "wow factor" look at just how easy it is to display and edit data using the combination of a data source control and a GridView control. This will also give you a good overview of the new controls and techniques that are explained in more detail throughout the rest of this chapter and the next.
• Table of ContentsA First Look at ASP.NET v. 2.0By
Publisher: Addison WesleyPub Date: October 23, 2003ISBN: 0-321-22896-0Pages: 528
"This book provides a first look at the new major release of ASP.NET. The authors have worked closely with the ASP.NET team at Microsoft to make sure that this book is authoritative, accurate, and informative. Anyone using ASP.NET will find a wealth of useful info on the next version."
-Scott Guthrie, Product Unit Manager, Web Platforms and Tools Team, Microsoft Corporation
A First Look at ASP.NET v. 2.0 systematically prepares you for Microsoft''''s ASP.NET 2.0 Web development platform, showing how to use it to reduce development time and costs, improve the performance of Web applications and services, simplify deployment and management, and extend your applications to mobile clients.
Drawing on extraordinary insider access to Microsoft''''s ASP.NET development team, three renowned ASP.NET experts cover every key platform enhancement, from Master Page templates for standardizing look and feel to improved security and data- access controls. They go far beyond already published white papers and previews, presenting detailed development techniques, best practices, and sample code that will give you a running start with ASP.NET 2.0.
This book''''s detailed coverage includes:
Streamlining database integration with "code-free" data binding and ASP.NET 2.0''''s new data source controls
Using Master Pages to improve your control over application look and feel
Strengthening security with membership providers, security server controls, cookieless forms authentication, and the new Role Manager
Simplifying personalization with ASP.NET 2.0 ThemesBuilding fast, flexible portals with Web Parts and the new Portal Framework
Delivering more effective mobile device support-with less complexity
Previewing new ASP.NET 2.0 controls and changes in existing controls
Using Microsoft''''s powerful new .NET and built-in administration tools
Whether you''''re already developing with ASP.NET, or preparing to migrate from ASP, A First Look at ASP.NET v. 2.0 gives you complete information for assessing ASP.NET 2.0-and making the most of it.