MacDonald / Freeman | Pro ASP.NET 4 in C# 2010 | E-Book | www.sack.de
E-Book

E-Book, Englisch, 1592 Seiten

MacDonald / Freeman Pro ASP.NET 4 in C# 2010


4th ed
ISBN: 978-1-4302-2530-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 1592 Seiten

ISBN: 978-1-4302-2530-0
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



ASP.NET 4 is the principal standard for creating dynamic web pages on the Windows platform. Pro ASP.NET 4 in C# 2010 raises the bar for high-quality, practical advice on learning and deploying Microsoft's dynamic web solution. This edition is updated with everything you need to master up to version 4 of ASP.NET, including coverage of ASP.NET MVC, ASP.NET AJAX 4, ASP.NET Dynamic Data, and Silverlight 3. Seasoned .NET professionals Matthew MacDonald and Mario Szpuszta explain how you can get the most from these groundbreaking technologies. They cover ASP.NET 4 as a whole, illustrating both the newer features and the functionality carried over from previous versions of ASP. This book will give you the knowledge you need to code real ASP.NET 4 applications in the best possible style.

Matthew MacDonald is an author,educator, and MCSD developer who has a passion for emerging technologies. He isthe author of more than a dozen books about .NET programming. In a dimly-remembered past life, he studied English literature and theoretical physics.

MacDonald / Freeman Pro ASP.NET 4 in C# 2010 jetzt bestellen!

Weitere Infos & Material


1;Title Page;2
2;Copyright Page;3
3;Contents at a Glance;4
4;Table of Contents;6
5;About the Author;33
6;About the Technical Reviewer;34
7;Introduction;35
7.1;What Does This Book Cover?;35
7.2;Who Is This Book For?;36
7.3;What Do You Need to Use This Book?;37
7.4;Customer Support;37
7.4.1;Sample Code;37
7.4.2;Bonus Chapters;37
8;Part 1: Core Concepts;39
9;Chapter 1: Introducing ASP.NET;40
9.1;The Seven Pillars of ASP.NET;40
9.1.1;#1: ASP.NET Is Integrated with the .NET Framework;40
9.1.2;#2: ASP.NET Is Compiled, Not Interpreted;41
9.1.3;#3: ASP.NET Is Multilanguage;43
9.1.4;#4: ASP.NET Is Hosted by the Common Language Runtime;45
9.1.5;#5: ASP.NET Is Object-Oriented;46
9.1.6;#6: ASP.NET Supports all Browsers;48
9.1.7;#7: ASP.NET Is Easy to Deploy and Configure;48
9.2;The Evolution of ASP.NET;49
9.2.1;ASP.NET 1.0 and 1.1;49
9.2.2;ASP.NET 2.0;49
9.2.3;ASP.NET 3.5;50
9.2.3.1;LINQ;50
9.2.3.2;ASP.NET AJAX;51
9.2.4;ASP.NET 4;53
9.2.4.1;ASP.NET MVC;54
9.2.4.2;ASP.NET Dynamic Data;55
9.2.5;Silverlight;55
9.3;Summary;56
10;Chapter 2: Visual Studio;57
10.1;Introducing Visual Studio;57
10.1.1;Websites and Web Projects;58
10.1.2;Creating a Projectless Website;59
10.1.2.1;The Development Language;60
10.1.2.2;The Framework Version;60
10.1.2.3;The Template;61
10.1.2.4;The Location;62
10.1.3;Designing a Web Page;64
10.1.3.1;Absolute Positioning;65
10.1.3.2;Smart Tags;66
10.1.3.3;Static HTML Tags;67
10.1.3.4;HTML Tables;68
10.1.3.5;Structuring HTML Markup;69
10.2;The Visual Studio IDE;71
10.2.1;Solution Explorer;73
10.2.2;Document Window;74
10.2.3;Toolbox;74
10.2.4;Error List and Task List;75
10.2.5;Server Explorer;77
10.3;The Code Editor;78
10.3.1;Adding Assembly References;79
10.3.2;IntelliSense and Outlining;82
10.3.2.1;Outlining;82
10.3.2.2;Member List;83
10.3.2.3;Error Underlining;85
10.3.3;Visual Studio 2010 Improvements;86
10.3.3.1;IntelliSense Gets More Intelligent;87
10.3.3.2;New Tools for Search and Navigation;88
10.3.3.3;Draggable Document Windows;92
10.4;The Code Model;92
10.4.1;How Code-Behind Files Are Connected to Pages;95
10.4.2;How Control Tags Are Connected to Page Variables;96
10.4.3;How Events Are Connected to Event Handlers;97
10.5;Web Projects;99
10.5.1;Creating a Web Project;100
10.5.2;Migrating a Website from a Previous Version of Visual Studio;102
10.6;Visual Studio Debugging;104
10.6.1;Single-Step Debugging;105
10.6.2;Variable Watches;108
10.6.3;Advanced Breakpoints;110
10.7;The Web Development Helper;110
10.8;Summary;112
11;Chapter 3: Web Forms;113
11.1;Page Processing;114
11.1.1;HTML Forms;114
11.1.2;Dynamic User Interface;116
11.1.3;The ASP.NET Event Model;117
11.1.4;Automatic Postbacks;118
11.1.4.1;Automatic Postbacks “Under the Hood”;118
11.1.5;View State;120
11.1.5.1;View State “Under the Hood”;122
11.1.5.2;View State Chunking;124
11.1.6;XHTML Compliance;124
11.1.6.1;Document Type Definitions;125
11.1.6.2;Configuring XHTML Rendering;126
11.1.6.3;Visual Studio’s Default Doctype;128
11.1.6.4;XHTML Validation;129
11.1.7;Client-Side Control IDs;130
11.2;Web Forms Processing Stages;133
11.2.1;Page Framework Initialization;134
11.2.2;User Code Initialization;135
11.2.3;Validation;135
11.2.4;Event Handling;136
11.2.5;Automatic Data Binding;136
11.2.6;Cleanup;137
11.2.7;A Page Flow Example;137
11.3;The Page As a Control Container;140
11.3.1;Showing the Control Tree;140
11.3.2;The Page Header;145
11.3.3;Dynamic Control Creation;146
11.4;The Page Class;148
11.4.1;Session, Application, and Cache;148
11.4.2;Request;149
11.4.3;Response;150
11.4.3.1;Moving Between Pages;152
11.4.4;Server;154
11.4.4.1;HTML and URL Encoding;155
11.4.5;User;157
11.4.6;Trace;157
11.4.6.1;Application Tracing;161
11.4.6.2;Tracing with the Web Development Helper;163
11.4.7;Accessing the HTTP Context in Another Class;163
11.5;Summary;164
12;Chapter 4: Server Controls;165
12.1;Types of Server Controls;165
12.1.1;The Server Control Hierarchy;166
12.2;HTML Server Controls;168
12.2.1;The HtmlControl Class;169
12.2.2;The HtmlContainerControl Class;169
12.2.3;The HtmlInputControl Class;170
12.2.4;The HTML Server Control Classes;170
12.2.5;Setting Style Attributes and Other Properties;172
12.2.6;Programmatically Creating Server Controls;173
12.2.7;Handling Server-Side Events;175
12.2.7.1;The ServerClick and ServerChange Events;176
12.3;Web Controls;178
12.3.1;The WebControl Base Class;179
12.3.2;Basic Web Control Classes;181
12.3.3;Units;183
12.3.4;Enumerations;183
12.3.5;Colors;184
12.3.6;Fonts;184
12.3.7;Focus;186
12.3.8;The Default Button;187
12.3.9;Scrollable Panels;188
12.3.10;Handling Web Control Events;189
12.3.10.1;The Click Event and the ImageButton Control;190
12.4;The List Controls;192
12.4.1;The Selectable List Controls;193
12.4.2;The BulletedList Control;197
12.5;Input Validation Controls;198
12.5.1;The Validation Controls;199
12.5.2;The Validation Process;200
12.5.3;The BaseValidator Class;201
12.5.4;The RequiredFieldValidator Control;203
12.5.5;The RangeValidator Control;203
12.5.6;The CompareValidator Control;204
12.5.7;The RegularExpressionValidator Control;204
12.5.8;The CustomValidator Control;207
12.5.9;The ValidationSummary Control;208
12.5.10;Using the Validators Programmatically;210
12.5.11;Validation Groups;211
12.6;Rich Controls;213
12.6.1;The AdRotator Control;214
12.6.2;The Calendar Control;216
12.7;Summary;218
13;Chapter 5: ASP.NET Applications;219
13.1;Anatomy of an ASP.NET Application;219
13.1.1;The Application Domain;220
13.1.2;Application Lifetime;221
13.1.3;Application Updates;222
13.1.4;Application Directory Structure;222
13.2;The global.asax Application File;223
13.2.1;Application Events;225
13.2.2;Demonstrating Application Events;227
13.3;ASP.NET Configuration;228
13.3.1;The machine.config File;229
13.3.1.1;;229
13.3.2;The web.config File;231
13.3.2.1;Configuration Inheritance;233
13.3.2.2;Using Elements;234
13.3.3;;235
13.3.4;;236
13.3.5;;237
13.3.6;;238
13.3.7;Reading and Writing Configuration Sections Programmatically;239
13.3.8;The Website Administration Tool (WAT);242
13.3.9;Extending the Configuration File Structure;243
13.3.9.1;Creating a Section Class;244
13.3.9.2;Registering a Section Class;245
13.3.10;Encrypting Configuration Sections;247
13.3.10.1;Programmatic Encryption;248
13.3.10.2;Command-Line Encryption;249
13.4;.NET Components;249
13.4.1;Creating a Component;250
13.4.2;Using a Component Through the App_Code Directory;251
13.4.3;Using a Component Through the Bin Directory;252
13.5;Extending the HTTP Pipeline;255
13.5.1;HTTP Handlers;255
13.5.2;Creating a Custom HTTP Handler;257
13.5.3;Configuring a Custom HTTP Handler;258
13.5.4;Using Configuration-Free HTTP Handlers;259
13.5.5;Creating an Advanced HTTP Handler;259
13.5.6;Creating an HTTP Handler for Non-HTML Content;262
13.5.7;HTTP Modules;265
13.5.8;Creating a Custom HTTP Module;267
13.6;Summary;270
14;Chapter 6: State Management;271
14.1;ASP.NET State Management;272
14.2;View State;274
14.2.1;A View State Example;275
14.2.2;Storing Objects in View State;277
14.2.3;Assessing View State;279
14.2.4;Selectively Disabling View State;280
14.2.5;View State Security;282
14.3;Transferring Information Between Pages;283
14.3.1;The Query String;284
14.3.1.1;Using the Query String;284
14.3.1.2;URL Encoding;285
14.3.2;Cross-Page Posting;285
14.3.2.1;Getting Page-Specific Information;287
14.3.2.2;Performing Cross-Page Posting in Any Event Handler;288
14.3.2.3;The IsPostBack and IsCrossPagePostBack Properties;289
14.3.2.4;Cross-Page Posting and Validation;290
14.4;Cookies;292
14.5;Session State;294
14.5.1;Session Architecture;294
14.5.2;Using Session State;295
14.5.3;Configuring Session State;297
14.5.3.1;Mode;297
14.5.3.1.1;Off;297
14.5.3.1.2;InProc;298
14.5.3.1.3;StateServer;298
14.5.3.1.4;SQLServer;300
14.5.3.1.5;Custom;302
14.5.3.2;Compression;302
14.5.3.3;Cookieless;303
14.5.3.4;Timeout;304
14.5.4;Securing Session State;304
14.6;Application State;305
14.6.1;Static Application Variables;307
14.7;Summary;309
15;Part 2: Data Access;310
16;Chapter 7: ADO.NET Fundamentals;311
16.1;The ADO.NET Architecture;312
16.1.1;ADO.NET Data Providers;312
16.1.2;Standardization in ADO.NET;314
16.1.3;Fundamental ADO.NET Classes;315
16.2;The Connection Class;317
16.2.1;Connection Strings;317
16.2.1.1;User Instance Connections;318
16.2.2;Testing a Connection;320
16.2.3;Connection Pooling;321
16.3;The Command and DataReader Classes;323
16.3.1;Command Basics;324
16.3.2;The DataReader Class;325
16.3.3;The ExecuteReader() Method and the DataReader;326
16.3.3.1;Null Values;328
16.3.3.2;CommandBehavior;329
16.3.3.3;Processing Multiple Result Sets;329
16.3.4;The ExecuteScalar() Method;332
16.3.5;The ExecuteNonQuery() Method;332
16.3.6;SQL Injection Attacks;333
16.3.7;Using Parameterized Commands;337
16.3.8;Calling Stored Procedures;338
16.4;Transactions;341
16.4.1;Transactions and ASP.NET Applications;341
16.4.1.1;Stored Procedure Transactions;343
16.4.1.2;Client-Initiated ADO.NET Transactions;345
16.4.2;Isolation Levels;346
16.4.3;Savepoints;348
16.5;Provider-Agnostic Code;349
16.5.1;Creating the Factory;350
16.5.2;Create Objects with Factory;351
16.5.3;A Query with Provider-Agnostic Code;352
16.6;Summary;353
17;Chapter 8: Data Components and the DataSet;354
17.1;Building a Data Access Component;354
17.1.1;The Data Package;356
17.1.2;The Stored Procedures;357
17.1.3;The Data Utility Class;358
17.1.3.1;Concurrency Strategies;363
17.1.4;Testing the Database Component;364
17.2;Disconnected Data;366
17.2.1;Web Applications and the DataSet;367
17.2.2;XML Integration;368
17.3;The DataSet;368
17.4;The DataAdapter Class;370
17.4.1;Filling a DataSet;371
17.4.2;Working with Multiple Tables and Relationships;373
17.4.3;Searching for Specific Rows;376
17.4.4;Using the DataSet in a Data Access Class;377
17.4.5;Data Binding;378
17.5;The DataView Class;378
17.5.1;Sorting with a DataView;379
17.5.2;Filtering with a DataView;381
17.5.3;Advanced Filtering with Relationships;383
17.5.4;Calculated Columns;383
17.6;Summary;385
18;Chapter 9: Data Binding;386
18.1;Basic Data Binding;387
18.1.1;Single-Value Binding;387
18.1.2;Other Types of Expressions;389
18.1.2.1;Custom Expression Builders;390
18.1.3;Repeated-Value Binding;393
18.1.3.1;Binding to a DataReader;396
18.1.3.2;The Rich Data Controls;399
18.1.3.3;Binding to a DataView;401
18.2;Data Source Controls;401
18.2.1;The Page Life Cycle with Data Binding;402
18.3;The SqlDataSource;403
18.3.1;Selecting Records;404
18.3.1.1;Data Binding “Under the Hood”;406
18.3.2;Parameterized Commands;407
18.3.2.1;Stored Procedures;409
18.3.2.2;More Parameter Types;409
18.3.3;Handling Errors;412
18.3.4;Updating Records;412
18.3.4.1;Strict Concurrency Checking;414
18.3.4.2;Updating with Stored Procedures;415
18.3.5;Deleting Records;417
18.3.6;Inserting Records;417
18.3.7;Disadvantages of the SqlDataSource;418
18.4;The ObjectDataSource;419
18.4.1;Selecting Records;420
18.4.1.1;Using a Parameterized Constructor;422
18.4.1.2;Using Method Parameters;423
18.4.2;Updating Records;425
18.4.3;Updating with a Data Object;426
18.4.3.1;Dealing with Nonstandard Method Signatures;427
18.4.3.2;Handling Identity Values in an Insert;428
18.5;The Limits of the Data Source Controls;430
18.5.1;The Problem;431
18.5.2;Adding the Extra Items;432
18.5.3;Handling the Extra Options with the SqlDataSource;432
18.5.4;Handling the Extra Options with the ObjectDataSource;433
18.6;Summary;434
19;Chapter 10: Rich Data Controls;435
19.1;The GridView;436
19.1.1;Defining Columns;436
19.2;Formatting the GridView;440
19.2.1;Formatting Fields;441
19.2.2;Styles;442
19.2.2.1;Defining Styles;443
19.2.2.2;Configuring Styles with Visual Studio;446
19.2.3;Formatting-Specific Values;446
19.3;GridView Row Selection;448
19.3.1;Using Selection to Create a Master-Details Form;450
19.3.2;The SelectedIndexChanged Event;452
19.3.3;Using a Data Field As a Select Button;453
19.4;Sorting the GridView;454
19.4.1;Sorting with the SqlDataSource;454
19.4.2;Sorting with the ObjectDataSource;455
19.4.3;Sorting and Selection;457
19.4.4;Advanced Sorting;457
19.5;Paging the GridView;459
19.5.1;Automatic Paging;459
19.5.2;Paging and Selection;461
19.5.3;Custom Pagination with the ObjectDataSource;461
19.5.3.1;Counting the Records;461
19.5.3.2;A Stored Procedure to Get Paged Records;462
19.5.3.3;The Paged Selection Method;463
19.5.4;Customizing the Pager Bar;464
19.6;GridView Templates;465
19.6.1;Using Multiple Templates;467
19.6.2;Editing Templates in Visual Studio;468
19.6.3;Binding to a Method;469
19.6.4;Handling Events in a Template;471
19.6.5;Editing with a Template;472
19.6.5.1;Editing with Advanced Controls;474
19.6.5.2;Editing Without a Command Column;477
19.6.6;Client IDs in Templates;479
19.7;The ListView;479
19.7.1;Grouping;483
19.7.2;Paging;485
19.8;The DetailsView and FormView;486
19.8.1;The DetailsView;486
19.8.1.1;Defining Fields;487
19.8.1.2;Record Operations;488
19.8.2;The FormView;489
19.9;Advanced Grids;491
19.9.1;Summaries in the GridView;491
19.9.2;A Parent/Child View in a Single Table;493
19.9.3;Editing a Field Using a Lookup Table;496
19.9.4;Serving Images from a Database;498
19.9.4.1;Displaying Binary Data;499
19.9.4.2;Reading Binary Data Efficiently;500
19.9.4.3;Integrating Images with Other Content;501
19.9.5;Detecting Concurrency Conflicts;504
19.10;Summary;508
20;Chapter 11: Caching and Asynchronous Pages;509
20.1;Understanding ASP.NET Caching;509
20.2;Output Caching;510
20.2.1;Declarative Output Caching;511
20.2.2;Caching and the Query String;512
20.2.3;Caching with Specific Query String Parameters;513
20.2.4;Custom Caching Control;513
20.2.5;Caching with the HttpCachePolicy Class;515
20.2.6;Post-Cache Substitution and Fragment Caching;516
20.2.6.1;Fragment Caching;516
20.2.6.2;Post-Cache Substitution;517
20.2.7;Cache Profiles;519
20.2.8;Cache Configuration;519
20.2.9;Output Caching Extensibility;520
20.2.9.1;Building a Custom Cache Provider;521
20.2.9.2;Using a Custom Cache Provider;524
20.3;Data Caching;525
20.3.1;Adding Items to the Cache;526
20.3.2;A Simple Cache Test;528
20.3.3;Cache Priorities;530
20.3.4;Caching with the Data Source Controls;530
20.3.4.1;Caching with SqlDataSource;531
20.3.4.2;Caching with ObjectDataSource;533
20.4;Cache Dependencies;534
20.4.1;File and Cache Item Dependencies;534
20.4.2;Aggregate Dependencies;535
20.4.3;The Item Removed Callback;536
20.4.4;Understanding SQL Cache Notifications;539
20.4.5;How Cache Notifications Work;540
20.4.6;Enabling Notifications;540
20.4.7;Creating the Cache Dependency;541
20.5;Custom Cache Dependencies;542
20.5.1;A Basic Custom Cache Dependency;542
20.5.2;A Custom Cache Dependency Using Message Queues;544
20.6;Asynchronous Pages;546
20.6.1;Creating an Asynchronous Page;547
20.6.2;Querying Data in an Asynchronous Page;549
20.6.3;Handling Errors;551
20.6.4;Using Caching with Asynchronous Tasks;554
20.6.5;Multiple Asynchronous Tasks and Timeouts;556
20.7;Summary;558
21;Chapter 12: Files and Streams;559
21.1;Working with the File System;559
21.1.1;The Directory and File Classes;560
21.1.2;The DirectoryInfo and FileInfo Classes;562
21.1.3;The DriveInfo Class;565
21.1.4;Working with Attributes;566
21.1.5;Filter Files with Wildcards;568
21.1.6;Retrieving File Version Information;569
21.1.7;The Path Class;570
21.1.8;A File Browser;573
21.2;Reading and Writing Files with Streams;578
21.2.1;Text Files;579
21.2.2;Binary Files;581
21.2.3;Uploading Files;582
21.2.4;Making Files Safe for Multiple Users;584
21.2.4.1;Creating Unique Filenames;585
21.2.4.2;Locking File Access Objects;588
21.2.5;Compression;589
21.3;Serialization;590
21.4;Summary;593
22;Chapter 13: LINQ;594
22.1;LINQ Basics;594
22.1.1;Deferred Execution;596
22.1.2;How LINQ Works;597
22.1.3;LINQ Expressions;598
22.1.3.1;Projections;599
22.1.3.2;Filtering and Sorting;601
22.1.3.3;Grouping and Aggregation;602
22.1.4;LINQ Expressions “Under the Hood”;606
22.1.4.1;Extension Methods;607
22.1.4.2;Lambda Expressions;608
22.1.4.3;Multipart Expressions;609
22.2;LINQ to DataSet;609
22.2.1;Typed DataSets;612
22.2.2;Null Values;612
22.3;LINQ to Entities;612
22.3.1;Generating the Data Model;613
22.3.2;The Data Model Classes;614
22.3.2.1;The Derived Object Context Class;614
22.3.2.2;The Entity Classes;615
22.3.3;Entity Relationships;617
22.3.3.1;One-to-Many Relationships;617
22.3.3.2;One-to-One Relationships;618
22.3.4;Querying Stored Procedures;618
22.3.5;LINQ to Entities Queries “Under the Hood”;620
22.3.5.1;Filtering Too Late;621
22.3.5.2;Using Lazy and Eager Data Loading;622
22.3.5.3;Using Explicit Loading;624
22.3.5.4;Compiling Queries;625
22.4;Database Operations;626
22.4.1;Inserts;626
22.4.1.1;Creating Partially Populated Entity Classes;626
22.4.1.2;Inserting Associated Entities;627
22.4.2;Updates;629
22.4.3;Deletes;629
22.4.4;Managing Concurrency;629
22.4.5;Handling Concurrency Conflicts;630
22.5;The EntityDataSource Control;635
22.5.1;Displaying Data;635
22.5.2;Getting Related Data;640
22.5.3;Editing Data;641
22.5.4;Validation;642
22.6;Using the QueryExtender Control;643
22.6.1;Using a SearchExpression;644
22.6.2;Using a RangeExpression;645
22.6.3;Using a PropertyExpression;645
22.6.4;Using a MethodExpression;646
22.7;Summary;647
23;Chapter 14: XML;648
23.1;When Does Using XML Make Sense?;648
23.2;An Introduction to XML;649
23.2.1;The Advantages of XML;650
23.2.2;Well-Formed XML;651
23.2.3;XML Namespaces;652
23.2.4;XML Schemas;653
23.3;Stream-Based XML Processing;655
23.3.1;Writing XML Files;655
23.3.2;Reading XML Files;659
23.4;In-Memory XML Processing;662
23.4.1;The XmlDocument;663
23.4.2;The XPathNavigator;667
23.4.3;The XDocument;669
23.4.3.1;Creating XML with XDocument;669
23.4.3.2;Reading XML with XDocument;671
23.4.3.3;Namespaces;673
23.5;Searching XML Content;674
23.5.1;Searching with XmlDocument;675
23.5.2;Searching XmlDocument with XPath;677
23.5.3;Searching XDocument with LINQ;680
23.6;Validating XML Content;682
23.6.1;A Basic Schema;682
23.6.2;Validating with XmlDocument;683
23.6.3;Validating with XDocument;685
23.7;Transforming XML Content;685
23.7.1;A Basic Stylesheet;686
23.7.2;Using XslCompiledTransform;687
23.7.3;Using the Xml Control;688
23.7.4;Transforming XML with LINQ to XML;689
23.8;XML Data Binding;691
23.8.1;Nonhierarchical Binding;691
23.8.2;Using XPath;693
23.8.3;Nested Grids;696
23.8.4;Hierarchical Binding with the TreeView;698
23.8.5;Using XSLT;700
23.8.6;Binding to XML Content from Other Sources;702
23.8.7;Updating XML Through the XmlDataSource;703
23.9;XML and the ADO.NET DataSet;703
23.9.1;Converting the DataSet to XML;704
23.9.2;Accessing a DataSet As XML;706
23.10;Summary;709
24;Part 3: Building ASP.NET Websites;710
25;Chapter 15: User Controls;711
25.1;User Control Basics;711
25.1.1;Creating a Simple User Control;712
25.1.2;Converting a Page to a User Control;714
25.2;Adding Code to a User Control;714
25.2.1;Handling Events;714
25.2.2;Adding Properties;715
25.2.3;Using Custom Objects;718
25.2.4;Adding Events;720
25.2.5;Exposing the Inner Web Control;724
25.3;Dynamically Loading User Controls;725
25.3.1;Portal Frameworks;725
25.4;Partial Page Caching;729
25.4.1;VaryByControl;729
25.4.2;Sharing Cached Controls;731
25.5;Summary;732
26;Chapter 16: Themes and Master Pages;733
26.1;Cascading Style Sheets;733
26.1.1;Creating a Stylesheet;733
26.1.2;Applying Stylesheet Rules;736
26.2;Themes;739
26.2.1;Theme Folders and Skins;739
26.2.2;Applying a Simple Theme;741
26.2.3;Handling Theme Conflicts;742
26.2.4;Creating Multiple Skins for the Same Control;743
26.2.5;Skins with Templates and Images;744
26.2.6;Using CSS in a Theme;747
26.2.7;Applying Themes Through a Configuration File;747
26.2.8;Applying Themes Dynamically;748
26.3;Standardizing Website Layout;750
26.4;Master Page Basics;750
26.4.1;A Simple Master Page;751
26.4.2;A Simple Content Page;753
26.4.3;Default Content;755
26.4.4;Master Pages with Tables and CSS Layout;756
26.4.5;Master Pages and Relative Paths;759
26.4.6;Applying Master Pages Through a Configuration File;760
26.5;Advanced Master Pages;760
26.5.1;Interacting with the Master Page Class;760
26.5.2;Dynamically Setting a Master Page;762
26.5.3;Nesting Master Pages;762
26.6;Summary;764
27;Chapter 17: Website Navigation;765
27.1;Pages with Multiple Views;766
27.1.1;The MultiView Control;766
27.1.2;The Wizard Control;771
27.1.2.1;Wizard Steps;772
27.1.2.2;Wizard Styles, Templates, and Layout;777
27.2;Site Maps;781
27.2.1;Defining a Site Map;782
27.2.2;Binding to a Site Map;783
27.2.3;Breadcrumbs;784
27.2.4;Showing a Portion of the Site Map;787
27.2.4.1;Skipping the Root Node;787
27.2.4.2;Starting from the Current Node;788
27.2.4.3;Starting from a Specific Node;788
27.2.5;The Site Map Objects;790
27.2.6;Adding Custom Site Map Information;792
27.2.7;Creating a Custom SiteMapProvider;793
27.2.7.1;Storing Site Map Information in a Database;793
27.2.7.2;Creating the Site Map Provider;794
27.2.7.3;Adding Sorting;798
27.2.7.4;Adding Caching;799
27.2.8;Security Trimming;800
27.3;URL Mapping and Routing;802
27.3.1;URL Mapping;802
27.3.2;URL Routing;803
27.4;The TreeView Control;804
27.4.1;The TreeNode;805
27.4.2;Populating Nodes on Demand;808
27.4.3;TreeView Styles;809
27.4.3.1;Applying Styles to Node Types;811
27.4.3.2;Applying Styles to Node Levels;811
27.4.3.3;TreeView Images;812
27.5;The Menu Control;813
27.5.1;Menu Styles;816
27.5.2;Menu Templates;818
27.6;Summary;819
28;Chapter 18: Website Deployment;820
28.1;Installing and Configuring IIS;820
28.1.1;Installing IIS 7;820
28.1.2;Managing IIS 7;822
28.2;Deploying a Website;824
28.2.1;Deploying by Copying Files;825
28.2.1.1;Preparing IIS;825
28.2.1.2;The Website;826
28.2.1.3;Deploying the Website;826
28.2.1.4;Configuring the Deployment;828
28.2.2;Using Web Deployment;830
28.2.2.1;Preparing IIS;830
28.2.2.2;The Website;830
28.2.2.3;Transforming web.config;831
28.2.2.4;Publishing Databases;835
28.2.2.5;Deploying the Website;836
28.2.3;Using FTP Deployment;838
28.2.3.1;Preparing IIS;839
28.2.3.2;The Website;840
28.2.3.3;Deploying the Website;840
28.2.3.4;Variation: Deploying a Project-less Website;842
28.3;Managing a Website;846
28.3.1;Creating a New Site;846
28.3.2;Creating Virtual Directories;847
28.3.3;Using the VirtualPathProvider;848
28.3.4;Using Application Pools;852
28.3.4.1;Creating a New Application Pool;854
28.3.4.2;Assigning an Application to an Application Pool;854
28.3.4.3;Starting and Stopping an Application Pool;855
28.3.4.4;Using Side-by-Side Execution;855
28.3.5;Using Application Warm-Up;855
28.3.5.1;Preparing IIS 7;856
28.3.5.2;Configuring Application Warm-Up;856
28.4;Extending the Integrated Pipeline;857
28.4.1;Creating the Handler;857
28.4.2;Deploying the Handler;858
28.4.3;Configuring the Handler;858
28.4.4;Testing the Handler;859
28.5;Summary;860
29;Part 4: Security;861
30;Chapter 19: The ASP.NET Security Model;862
30.1;What It Means to Create Secure Software;862
30.1.1;Understanding Potential Threats;862
30.1.2;Secure Coding Guidelines;863
30.1.3;Understanding Gatekeepers;864
30.2;Understanding the Levels of Security;865
30.2.1;Authentication;865
30.2.1.1;Impersonation;866
30.2.2;Authorization;866
30.2.3;Confidentiality and Integrity;867
30.2.4;Pulling It All Together;868
30.3;Understanding Secure Sockets Layer;869
30.3.1;Understanding Certificates;870
30.3.2;Understanding SSL;870
30.3.3;Configuring SSL in IIS 7.x;872
30.3.3.1;Configuring Bindings for SSL;874
30.3.3.2;Encoding Information with SSL;875
30.4;Summary;876
31;Chapter 20: Forms Authentication;877
31.1;Introducing Forms Authentication;877
31.1.1;Why Use Forms Authentication?;878
31.1.1.1;Controlling the Authentication Code;879
31.1.1.2;Controlling the Appearance of the Login Form;879
31.1.1.3;Working with a Range of Browsers;879
31.1.1.4;Storing User Information;879
31.1.2;Why Would You Not Use Forms Authentication?;880
31.1.2.1;Creating Your Own Login Interface;880
31.1.2.2;Maintaining User Details;880
31.1.2.3;Intercepting Network Traffic;881
31.1.3;Why Not Implement Cookie Authentication Yourself?;881
31.1.3.1;Keeping the Authentication Cookie Secure;881
31.1.3.2;Forms Authentication Is Well Tested;882
31.1.3.3;Integrating with the ASP.NET Security Framework;882
31.1.4;The Forms Authentication Classes;882
31.2;Implementing Forms Authentication;883
31.2.1;Configuring Forms Authentication;883
31.2.1.1;Credentials Store in web.config;886
31.2.2;Denying Access to Anonymous Users;887
31.2.3;Creating a Custom Login Page;888
31.2.3.1;Logging Out;892
31.2.3.2;Hashing Passwords in web.config;892
31.2.3.3;Cookieless Forms Authentication;893
31.2.4;Custom Credentials Store;894
31.2.5;Persistent Cookies in Forms Authentication;895
31.3;IIS 7.x and Forms Authentication;897
31.4;Summary;902
32;Chapter 21: Membership;903
32.1;Introducing the ASP.NET Membership API;903
32.2;Using the Membership API;906
32.2.1;Configuring Forms Authentication;908
32.2.2;Creating the Data Store;909
32.2.2.1;Database Scripts for ASP.NET Services;912
32.2.2.2;File-Based SQL Server Store;915
32.2.3;Configuring Connection String and Membership Provider;916
32.2.4;Creating and Authenticating Users;919
32.3;Using the Security Controls;923
32.3.1;The Login Control;924
32.3.1.1;Templates and the Login Control;930
32.3.1.2;Programming the Login Control;932
32.3.2;The LoginStatus Control;935
32.3.3;The LoginView Control;936
32.3.4;The PasswordRecovery Control;937
32.3.4.1;PasswordRecovery Templates;939
32.3.5;The ChangePassword Control;942
32.3.6;The CreateUserWizard Control;943
32.4;Configuring Membership in IIS 7.x;948
32.4.1;Configuring Providers and Users;948
32.4.2;Using the Membership API with Other Applications;950
32.5;Using the Membership Class;952
32.5.1;Retrieving Users from the Store;953
32.5.2;Updating Users in the Store;955
32.5.3;Creating and Deleting Users;956
32.5.4;Validating Users;957
32.6;Summary;957
33;Chapter 22: Windows Authentication;958
33.1;Introducing Windows Authentication;958
33.1.1;Why Use Windows Authentication?;958
33.1.2;Why Would You Not Use Windows Authentication?;960
33.1.3;Mechanisms for Windows Authentication;960
33.1.3.1;Basic Authentication;961
33.1.3.2;Digest Authentication;962
33.1.3.3;Integrated Windows Authentication;962
33.2;Implementing Windows Authentication;967
33.2.1;Configuring IIS 7.x;967
33.2.2;Configuring ASP.NET;969
33.2.3;Deeper Into the IIS 7.x Pipeline;970
33.2.4;Denying Access to Anonymous Users;973
33.2.5;Accessing Windows User Information;975
33.2.5.1;The WindowsPrincipal Class;976
33.2.5.2;The WindowsIdentity Class;977
33.2.5.3;IdentityReference and Role Information;979
33.3;Impersonation;981
33.3.1;Impersonation and Delegation in Windows;981
33.3.2;Configured Impersonation;983
33.3.3;Programmatic Impersonation;984
33.3.3.1;Getting a Token;984
33.3.3.2;Performing the Impersonation;985
33.4;Summary;987
34;Chapter 23: Authorization and Roles;988
34.1;URL Authorization;988
34.1.1;Authorization Rules;989
34.1.1.1;Controlling Access for Specific Users;990
34.1.1.2;Controlling Access to Specific Directories;992
34.1.1.3;Controlling Access to Specific Files;993
34.1.1.4;Controlling Access for Specific Roles;993
34.2;File Authorization;995
34.3;Authorization Checks in Code;995
34.3.1;Using the IsInRole() Method;995
34.3.2;Using the PrincipalPermission Class;996
34.3.2.1;Merging PrincipalPermission Objects;997
34.3.2.2;Using the PrincipalPermission Attribute;998
34.4;Using the Roles API for Role-Based Authorization;999
34.4.1;Using the LoginView Control with Roles;1006
34.4.2;Accessing Roles Programmatically;1006
34.4.3;Using the Roles API with Windows Authentication;1009
34.5;Authorization and Roles in IIS 7.x;1011
34.5.1;Authorization with ASP.NET Roles in IIS 7.x;1014
34.5.2;Managing ASP.NET Roles with IIS 7.x;1016
34.6;Summary;1018
35;Chapter 24: Profiles;1019
35.1;Understanding Profiles;1019
35.1.1;Profile Performance;1020
35.1.2;How Profiles Store Data;1021
35.1.3;Profiles and Authentication;1022
35.1.4;Profiles vs. Custom Data Components;1022
35.2;Using the SqlProfileProvider;1022
35.2.1;Creating the Profile Tables;1023
35.2.2;Configuring the Provider;1026
35.2.3;Defining Profile Properties;1027
35.2.4;Using Profile Properties;1028
35.2.5;Profile Serialization;1030
35.2.6;Profile Groups;1032
35.2.7;Profiles and Custom Data Types;1032
35.2.7.1;Custom Type Serialization;1033
35.2.7.2;Automatic Saves;1034
35.2.8;The Profiles API;1036
35.2.9;Anonymous Profiles;1039
35.2.9.1;Migrating Anonymous Profiles;1040
35.3;Custom Profile Providers;1041
35.3.1;The Custom Profile Provider Classes;1042
35.3.2;Designing the FactoredProfileProvider;1044
35.3.3;Coding the FactoredProfileProvider;1045
35.3.3.1;Initialization;1045
35.3.3.2;Reading Profile Information;1047
35.3.3.3;Updating Profile Information;1048
35.3.4;Testing the FactoredProfileProvider;1049
35.4;Summary;1052
36;Chapter 25: Cryptography;1053
36.1;Encrypting Data: Confidentiality Matters;1053
36.2;The .NET Cryptography Namespace;1054
36.3;Understanding the .NET Cryptography Classes;1057
36.3.1;Symmetric Encryption Algorithms;1059
36.3.2;Asymmetric Encryption;1060
36.3.3;The Abstract Encryption Classes;1061
36.3.4;The ICryptoTransform Interface;1061
36.3.5;The CryptoStream Class;1062
36.4;Encrypting Sensitive Data;1063
36.4.1;Managing Secrets;1063
36.4.2;Using Symmetric Algorithms;1065
36.4.2.1;Using the SymmetricEncryptionUtility Class;1069
36.4.3;Using Asymmetric Algorithms;1071
36.4.4;Encrypting Sensitive Data in a Database;1073
36.5;Encrypting the Query String;1078
36.5.1;Wrapping the Query String;1078
36.5.2;Creating a Test Page;1081
36.6;Summary;1083
37;Chapter 26: Custom Membership Providers;1084
37.1;Architecture of Custom Providers;1084
37.2;Basic Steps for Creating Custom Providers;1086
37.2.1;Overall Design of the Custom Provider;1086
37.2.2;Designing and Implementing the Custom Store;1088
37.2.3;Implementing the Provider Classes;1095
37.2.3.1;Creating Users and Adding Them to the Store;1099
37.2.3.2;Validating Users on Login;1103
37.2.3.3;Using Salted Password Hashes;1105
37.2.3.4;The Remaining Functions of the Provider;1107
37.2.3.5;Implementing the XmlRoleProvider;1109
37.2.4;Using the Custom Provider Classes;1115
37.2.4.1;Debugging Using the WAT;1117
37.2.4.2;Using Custom Providers with IIS 7.x;1118
37.3;Summary;1120
38;Part 5: Advanced User Interface;1121
39;Chapter 27: Custom Server Controls;1122
39.1;Custom Server Control Basics;1122
39.1.1;Creating a Bare-Bones Custom Control;1123
39.1.2;Using a Custom Control;1125
39.1.3;Custom Controls in the Toolbox;1126
39.1.4;Creating a Web Control That Supports Style Properties;1129
39.1.5;The Rendering Process;1132
39.2;Dealing with Different Browsers;1134
39.2.1;The HtmlTextWriter;1134
39.2.2;Browser Detection;1135
39.2.3;Browser Properties;1136
39.2.4;Overriding Browser Type Detection;1138
39.2.5;Adaptive Rendering;1138
39.3;Control State and Events;1140
39.3.1;View State;1140
39.3.2;Control State;1142
39.3.3;Postback Data and Change Events;1144
39.3.4;Triggering a Postback;1146
39.4;Extending Existing Web Controls;1148
39.4.1;Composite Controls;1148
39.4.2;Derived Controls;1151
39.4.2.1;Creating a Label for Specific Data;1151
39.5;Summary;1154
40;Chapter 28: Graphics, GDI+, and Charting;1155
40.1;The ImageMap Control;1155
40.1.1;Creating Hotspots;1156
40.1.2;Handling Hotspot Clicks;1157
40.1.3;A Custom Hotspot;1159
40.2;Drawing with GDI+;1161
40.2.1;Simple Drawing;1161
40.2.2;Image Format and Quality;1163
40.2.3;The Graphics Class;1165
40.2.4;Using a GraphicsPath;1168
40.2.5;Pens;1169
40.2.6;Brushes;1172
40.3;Embedding Dynamic Graphics in a Web Page;1174
40.3.1;Using the PNG Format;1175
40.3.2;Passing Information to Dynamic Images;1175
40.3.3;Custom Controls That Use GDI+;1178
40.3.3.1;The Custom Control Class;1179
40.3.3.2;The Rendering Page;1181
40.4;Using the Chart Control;1183
40.4.1;Creating a Basic Chart;1183
40.4.2;Populating a Chart with Data;1190
40.4.2.1;Binding to a Database Table;1190
40.4.2.2;Binding to a Object DataSource;1193
40.4.2.3;Binding to an XML File;1194
40.4.2.4;Binding to LINQ;1196
40.5;Summary;1198
41;Chapter 29: JavaScript and Ajax Techniques;1199
41.1;JavaScript Essentials;1199
41.1.1;The HTML Document Object Model;1200
41.1.2;Client-Side Events;1201
41.1.2.1;Adding JavaScript Attributes Declaratively;1203
41.1.2.2;The OnClientClick Property;1203
41.1.3;Script Blocks;1204
41.1.4;Manipulating HTML Elements;1205
41.1.5;Debugging JavaScript;1206
41.2;Basic JavaScript Examples;1209
41.2.1;Creating a JavaScript Page Processor;1210
41.2.2;Using JavaScript to Download Images Asynchronously;1213
41.2.3;Rendering Script Blocks;1218
41.3;Script Injection Attacks;1219
41.3.1;Request Validation;1220
41.3.2;Disabling Request Validation;1221
41.3.3;Extending Request Validation;1223
41.4;Custom Controls with JavaScript;1225
41.4.1;Pop-Up Windows;1225
41.4.2;Rollover Buttons;1230
41.5;Frames;1233
41.5.1;Frame Navigation;1234
41.5.2;Inline Frames;1236
41.6;Understanding Ajax;1237
41.6.1;The XMLHttpRequest Object;1238
41.6.1.1;Sending a Request;1239
41.6.1.2;Handling the Response;1240
41.6.2;An Ajax Example;1240
41.7;Using Ajax with Client Callbacks;1244
41.7.1;Creating a Client Callback;1245
41.7.1.1;Building the Basic Page;1246
41.7.1.2;Implementing the Callback;1246
41.7.1.3;Writing the Client-Side Script;1248
41.7.1.4;Disabling Event Validation;1250
41.7.2;Client Callbacks “Under the Hood”;1251
41.7.3;Client Callbacks in Custom Controls;1252
41.7.3.1;The DynamicPanel;1253
41.7.3.2;The DynamicPanelRefreshLink;1255
41.7.3.3;The Client Page;1256
41.8;Summary;1257
42;Chapter 30: ASP.NET AJAX;1258
42.1;Introducing ASP.NET AJAX;1258
42.1.1;ASP.NET AJAX on the Client: The Script Libraries;1259
42.1.2;ASP.NET AJAX on the Server: The ScriptManager;1260
42.2;Server Callbacks;1261
42.2.1;Web Services in ASP.NET AJAX;1262
42.2.1.1;Creating the Web Service;1263
42.2.1.2;Creating the Web Method;1264
42.2.1.3;Calling the Web Service;1267
42.2.2;Placing a Web Method in a Page;1269
42.2.3;ASP.NET AJAX Application Services;1271
42.2.3.1;Authentication Service;1271
42.2.3.2;Role Service;1274
42.2.3.3;Profile Service;1276
42.3;ASP.NET AJAX Server Controls;1278
42.3.1;Partial Rendering with the UpdatePanel;1279
42.3.1.1;Handling Errors;1281
42.3.1.2;Conditional Updates;1283
42.3.1.3;Interrupted Updates;1284
42.3.1.4;Triggers;1285
42.3.1.5;Optimizing the UpdatePanel;1286
42.3.2;Timed Refreshes with the Timer;1287
42.3.3;Time-Consuming Updates with UpdateProgress;1288
42.3.3.1;Cancellation;1290
42.3.4;Managing Browser History;1291
42.3.4.1;Adding History Points;1292
42.3.4.2;Restoring Page State;1293
42.3.4.3;How State Is Stored in the URL;1294
42.4;Deeper into the Client Libraries;1295
42.4.1;Understanding the Client Model;1295
42.4.2;Object-Oriented Programming in JavaScript;1296
42.4.2.1;Closures;1297
42.4.2.2;Prototypes;1299
42.4.2.3;Registering Classes with ASP.NET AJAX;1300
42.4.2.4;Base Types;1301
42.4.2.5;Namespaces;1302
42.4.2.6;Inheritance;1303
42.4.2.7;Interfaces;1304
42.4.3;The Web-Page Framework;1305
42.4.3.1;The Application Class;1305
42.4.3.2;The PageRequestManager Class;1306
42.4.3.3;A Client-Side AJAX Control;1307
42.5;Control Extenders;1310
42.5.1;Installing the ASP.NET AJAX Control Toolkit;1311
42.5.2;The AutoCompleteExtender;1313
42.5.3;The ASP.NET AJAX Control Toolkit;1316
42.6;Summary;1321
43;Chapter 31: Portals with Web Part Pages;1322
43.1;Typical Portal Pages;1323
43.2;Basic Web Part Pages;1324
43.2.1;Creating the Page Design;1325
43.2.2;WebPartManager and WebPartZone Controls;1326
43.2.3;Adding Web Parts to the Page;1328
43.2.4;Customizing the Page;1332
43.3;Creating Web Parts;1335
43.3.1;Simple Web Part Tasks;1335
43.3.1.1;Implementing the IWebPart Interface;1340
43.3.2;Developing Advanced Web Parts;1344
43.3.2.1;Before You Start: Creating Typed DataSets;1345
43.3.2.2;The Custom WebPart’s Skeleton;1347
43.3.2.3;Initializing the Web Part;1347
43.3.2.4;Loading Data and Processing Events;1349
43.3.2.5;The Final Rendering;1351
43.3.2.6;More Customization Steps;1352
43.3.2.7;Using the Web Part;1353
43.3.3;Web Part Editors;1354
43.3.3.1;Creating a Custom Editor;1356
43.3.4;Connecting Web Parts;1360
43.3.4.1;Defining the Communication Contract;1362
43.3.4.2;Implementing the Provider Web Part;1362
43.3.4.3;Creating the Consumer Web Part;1364
43.3.4.4;Static Connections Between Web Parts;1366
43.3.4.5;Dynamically Configuring Connection Points;1367
43.3.4.6;Multiple Connection Points;1368
43.3.5;Custom Verbs and Web Parts;1369
43.3.6;User Controls and Advanced Web Parts;1370
43.3.7;Uploading Web Parts Dynamically;1373
43.3.8;Authorizing Web Parts;1379
43.3.9;Final Tasks for Personalization;1379
43.3.9.1;Clearing Personalization;1380
43.4;Summary;1380
44;Chapter 32: MVC;1381
44.1;Choosing Between MVC and Web Forms;1381
44.2;Creating a Basic MVC Application;1382
44.2.1;Creating the Model;1383
44.2.2;Creating the Controller;1383
44.2.3;Creating the Index View;1384
44.2.4;Testing the (Incomplete) Application;1385
44.2.5;Completing the Controller and Views;1386
44.2.6;Modifying the Site.Master File;1389
44.3;Extending the Basic MVC Application;1389
44.3.1;Configuring Routing;1389
44.3.2;Adding Error Handling;1391
44.3.3;Adding Authentication;1392
44.3.4;Consolidating Data Store Access;1393
44.3.5;Adding Support for Foreign Key Constraints;1396
44.4;Customizing Views;1396
44.4.1;Modifying the View;1397
44.4.2;Adding View Data;1399
44.5;Adding to the Model;1401
44.6;Validating Data;1406
44.6.1;Performing Basic Validation;1406
44.6.2;Adding Validation Annotations;1408
44.7;Using Action Results;1411
44.7.1;Returning JSON Data;1412
44.7.2;Calling Another Controller Method;1413
44.8;Summary;1414
45;Chapter 33: Dynamic Data;1415
45.1;Creating a Dynamic Data Application;1415
45.1.1;Creating the Dynamic Data Site;1415
45.1.2;Exploring the Dynamic Data Site;1418
45.2;Understanding the Anatomy of a Dynamic Data Project;1421
45.3;Customizing a Dynamic Data Site;1422
45.3.1;Customizing with Templates;1422
45.3.1.1;Editing the Default Templates;1422
45.3.1.2;Creating a Custom Page Template;1423
45.3.1.3;Using Entity Templates;1425
45.3.1.4;Customizing Field Templates;1429
45.3.2;Customizing with Routes;1432
45.3.2.1;Understanding Routes;1433
45.3.2.2;Switching to Single-Page Editing;1437
45.3.2.3;Using Different Templates for Tables;1437
45.3.3;Customizing with Metadata;1441
45.3.3.1;Creating a Metadata Class;1442
45.3.3.2;Changing Display Names;1442
45.3.3.3;Changing Visibility;1444
45.3.3.4;Customizing Field Formatting;1446
45.3.3.5;Using a Custom Field Template;1447
45.3.4;Customizing Validation;1448
45.3.4.1;Requiring a Field Value;1448
45.3.4.2;Specifying a Valid Range;1449
45.3.4.3;Customizing Validation Using Extensibility Methods;1450
45.4;Summary;1453
46;Chapter 34: Silverlight;1454
46.1;Understanding Silverlight;1455
46.1.1;Silverlight vs. Flash;1456
46.1.2;Silverlight System Requirements;1458
46.2;Creating a Silverlight Solution;1459
46.2.1;Silverlight Compilation;1460
46.2.2;The Entry Page;1462
46.3;Creating a Silverlight Project;1466
46.3.1;Designing a Silverlight Page;1467
46.3.2;Understanding XAML;1471
46.3.3;Setting Properties;1472
46.3.4;The XAML Code-Behind;1473
46.3.5;Handling Events;1474
46.3.6;Browsing the Silverlight Class Libraries;1476
46.4;Layout;1477
46.4.1;The Canvas;1477
46.4.1.1;Layering Elements in a Canvas;1478
46.4.1.2;Dragging Circles;1479
46.4.2;The Grid;1483
46.4.2.1;Fine-Tuning Rows and Columns;1485
46.4.2.2;Nesting Layout Containers;1485
46.4.2.3;Spanning Rows and Columns;1487
46.5;Animation;1488
46.5.1;Animation Basics;1488
46.5.2;Defining an Animation;1489
46.5.2.1;The Animation Class;1489
46.5.3;The Storyboard Class;1489
46.5.3.1;Configuring Animation Properties;1491
46.5.4;An Interactive Animation Example;1492
46.5.5;Transforms;1496
46.5.5.1;Using a Transform;1497
46.5.5.2;Animating a Transform;1498
46.6;Using Web Services with Silverlight;1500
46.6.1;Creating the Web Service;1501
46.6.2;Adding a Web Reference;1501
46.6.3;Calling the Web Service;1502
46.6.4;Configuring the Web Service URL;1504
46.6.5;Cross-Domain Web Service Calls;1505
46.7;Summary;1506
47;Index;1508



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.