Wrox Home  

Topic: Web

Jumping from ASP.NET to Silverlight 2 (0470477164) cover image

Jumping from ASP.NET to Silverlight 2

Daniel Crenna
ISBN: 978-0-470-47716-8
Wrox Blox PDF
December 2008
Electronic Version: US $6.99 Purchase This Download

About This Title  |  Download Code  |  Errata
This Wrox Blox aims to provide an ASP.NET developer who is ready to begin his or her learning in Silverlight 2 with some familiar context, while focusing on key areas that a developer needs to be productive: layout, state, consuming and binding to data, and developing reusable controls. While there is massive depth within Silverlight 2 in its entirety, we cover some essential elements to prepare the developer for enhancing future learning or moving directly into self-study and experimentation in the core areas presented within.


ASP.NET developers have heard about the promise of delivering stunning rich client interfaces in Silverlight for a long time. From WPF, WPF/E, Silverlight 1.0, 1.1, various betas of Silverlight 2, and now the final Silverlight 2.0 release, one unmistakable characteristic of Silverlight is the departure it takes from both traditional ASP.NET Web Forms development and HTML standards at large. With the richness and flexibility inherent in this new platform comes a steep learning curve that has, up until now, justified a “wait and see” approach among .NET developers and the companies choosing .NET for their emerging web projects.


Yet the increasing expectations of web users, the power of the platform, and the large degree of overlap between .NET developers’ existing skill sets in Windows application development make Silverlight 2 a more attractive choice than ever.


A professional-level understanding of ASP.NET web development is assumed, while there is no required background in Silverlight 2.


Table of Contents


What You Need to Get Started 2

Understanding the Client 2

Silverlight 2 versus .NET 2

Silverlight Deployments 5

Working with Application Resources 7

XAML Markup 8

Attached Properties 10

Managing Layout 10

Managing State 18

Application State 18

Isolated Storage on the Client 19

Programming State for Settings 24

Programming State for Custom Data 26

Control Development 28

Expression Blend 2 SP1 29

User Controls and Custom Controls 30

Establishing a Default Control Style 30

Control Properties and Behaviors 32

Creating XAML Assets 34

Working with VisualStateManager 35

Consuming Data 39

Obtaining Data from Application Resources 39

Fetching Data Using Web Services 39

Crossing Domains for Data 40

Calling ASP.NET Web Services 41

Windows Communication Foundation 42

Consuming Data from a Services Layer 43

Accessing Cross-Domain Data with WebClient 44

Persisting Server Objects 45

Data Binding 46

ObservableCollection<T> and INotifyPropertyChanged 46

Two-Way Binding 50

Using ASP .NET and Silverlight 2 Together 52

Adding Silverlight 2 Applications to an ASP .NET Page 52

Communicating between Silverlight Instances 53

Performance and Security Considerations 55

No Reliable Measure of Client Performance 55

One Control, One Instance 56

Silverlight Code Is as Readable as Any Static Resource 56

Conclusion 57

About the Author 58 


Usage Rights for Wiley Wrox Blox  


Any Wrox Blox you purchase from this site will come with certain restrictions that allow Wiley to protect the copyrights of its products. After you purchase and download this title, you:    

  • Are entitled to three downloads
  • Are entitled to make a backup copy of the file for your own use
  • Are entitled to print the Wrox Blox for your own use
  • Are entitled to make annotations and comments in the Wrox Blox file for your own use
  • May not lend, sell or give the Wrox Blox to another user
  • May not place the Wrox Blox file on a network or any file sharing service for use by anyone other than yourself or allow anyone other than yourself to access it
  • May not copy the Wrox Blox file other than as allowed above
  • May not copy, redistribute, or modify any portion of the Wrox Blox contents in any way without prior permission from Wiley 

If you have any questions about these restrictions, you may contact Customer Care at (877) 762-2974 (8 a.m. - 5 p.m. EST, Monday - Friday). If you have any issues related to Technical Support, please contact us at 800-762-2974 (United States only) or 317-572-3994 (International) 8 a.m. - 8 p.m. EST, Monday - Friday).


Printer-Ready Version   Share This
With you wherever you go: pdf + ePub + kindle -- DRM-free