Theming a Site.............................................................................609
Setting Up a Theme ..............................................................610
Creating Skins
......................................................................610
Creating Style Sheets
.............................................................612
Securing a Website........................................................................612
Data Binding
...............................................................................614
Setting Up a Business Object
...................................................614
Simple Data Binding .............................................................615
Data Binding with an ObjectDataSource
...................................615
Summary
....................................................................................617
28 Adding Interactivity to Your Web Apps with ASP.NET AJAX 619
What Is AJAX?
.............................................................................619
Setting Up an ASP.NET AJAX Site
....................................................620
The AJAX Page Life Cycle
..............................................................621
Loading Custom Script Libraries
......................................................623
ASP.NET AJAX Controls
.................................................................625
The UpdatePanel Control
.......................................................625
The UpdateProgress Control
...................................................627
The Timer Control
................................................................628
Accessing Controls via JavaScript
....................................................628
Simple Control ID Access in JavaScript
.....................................629
Accessing Mangled ASP.NET Control IDs
...................................631
Calling Web Services with ASP.NET AJAX
.........................................635
Reasons and Tradeoffs in Using AJAX with Web Services
.............636
Using AJAX with Web Services
................................................636
Summary
....................................................................................640
29 Crafting Rich Web Applications with Silverlight 641
What Makes Silverlight Tick?
..........................................................641
Where Do WPF and XAML Come In?
.......................................641
How Does Silverlight Relate to ASP.NET, JavaScript, and AJAX?
.....642
Starting a Silverlight Project in VS2008
............................................642
Creating a Silverlight Project
..................................................643
Understanding the Parts of a Silverlight Project
.........................644
Handling Silverlight Events with C#
................................................648
Adding a C# Handler for a Silverlight Control Event
...................648
Working with Data in Silverlight
.............................................649
Playing Media
..............................................................................652
Adding the MediaPlayer to a WebForm
.....................................652
Manipulating the MediaElement with C#
.................................653
Animating UI Elements
.................................................................655
Summary
....................................................................................657
xviii
Contents