Loading...

Secrets of Real World ASP.NET Dynamic Data Websites

ISBN: 978-0-470-45735-1

December 2010

34 pages

Description
This Wrox Blox will teach you how to work with the new ASP.NET Dynamic Data feature set. Rather than being a new data access technology or some new approach to querying the database, a Dynamic Data web site helps abstract the user interface controls needed to present the data in your database. You will learn to model the database in LINQ to SQL and apply a variety of metadata attributes to the model. These attributes and their arguments will allow field templates to adapt to the context of the application. Furthermore, this Wrox Blox will teach you how to build specialized user controls called field templates that respond to the metadata information applied to database models. You will see how to push validation rules and custom business logic out of the user interface layer and down to the model layer. Finally, you will learn how to secure scaffolding pages that provide full editing capabilities to your database tables.

Table of Contents

 Exploring a Dynamic Data Web Site 1

Prerequisites 2

Create the Web Site 2

Building Blocks 6

Understanding Model Metadata 7

Display Name 9

Required 9

Regular Expression 9

String Length 9

UI Hint 9

Range 9

Display Format 10

Scaffold Column 10

Metadata Type 10

Display Column 10

Scaffold Table 10

Building Custom Field Templates 10

Build the URL Field Templates 11

Validating against Custom Business Logic 19

Validate Unique E-Mail Addresses 20

Move the Data Context to a Separate Assembly 22

Secure the Scaffolding 25

Add ASP.NET Membership Services 25

Secure Scaffold Pages 28

Wrapping Up 29

About the Author 30

About the Author
Craig Shoemaker is a software developer, podcaster, blogger and New-Media Evangelist for Infragistics. As host of the Polymorphic Podcast (http://polymorphicpodcast.com) and Pixel8 (http://getpixel8ed.com/) Craig does what he loves most - making contributions to the community and drawing the best out of industry luminaries.
Craig is a Microsoft ASP.NET MVP, ASP Insider and guest speaker at various developer user groups and tradeshows. Craig is co-author of the Wrox books "Beginning ASP.NET 2.0 AJAX", "Beginning ASP.NET Ajax" and a contributor to CoDe Magazine. In his spare time Craig enjoys looking for a haystack to hide his prize needle collection.
Series