About the Authors |
|
xvii | |
About the Technical Reviewer |
|
xix | |
Acknowledgments |
|
xxi | |
Introduction |
|
xxiii | |
|
|
1 | (42) |
|
|
1 | (1) |
|
The Heart and Soul of ASP .NET |
|
|
1 | (1) |
|
A .NET Framework ``Hello, World'' Web Form |
|
|
2 | (5) |
|
|
7 | (2) |
|
|
9 | (1) |
|
|
9 | (2) |
|
The Web Page As a Control Tree |
|
|
11 | (2) |
|
|
13 | (27) |
|
The System.Web.UI Namespace |
|
|
14 | (1) |
|
System.Web.UI.HtmlControls Namespace |
|
|
14 | (6) |
|
The System.Web.UI.WebControls Namespace |
|
|
20 | (20) |
|
Web Controls vs. HTML Controls |
|
|
40 | (1) |
|
|
41 | (2) |
|
Encapsulating Functionality in ASP.NET |
|
|
43 | (42) |
|
Packaging Content in ASP.NET |
|
|
43 | (2) |
|
|
44 | (1) |
|
|
45 | (1) |
|
Comparing the Control-Building Techniques |
|
|
45 | (33) |
|
|
45 | (4) |
|
|
49 | (3) |
|
|
52 | (8) |
|
Building a Custom Control |
|
|
60 | (18) |
|
|
78 | (4) |
|
ASP.NET Ajax UpdatePanel Server Control |
|
|
78 | (1) |
|
ASP.NET Ajax UpdateProgress Server Control |
|
|
79 | (3) |
|
Using Design-Time Attributes |
|
|
82 | (2) |
|
|
82 | (1) |
|
Common Design-Time Attributes |
|
|
83 | (1) |
|
|
84 | (1) |
|
|
85 | (38) |
|
ASP.NET Request-Processing Architecture |
|
|
85 | (3) |
|
|
87 | (1) |
|
ASP.NET and Server-Side State Management |
|
|
88 | (1) |
|
|
88 | (1) |
|
Server-Side State Considerations |
|
|
89 | (1) |
|
ASP.NET and Client-Side State Management |
|
|
89 | (7) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (2) |
|
|
93 | (3) |
|
|
96 | (12) |
|
|
100 | (1) |
|
|
101 | (1) |
|
ASP.NET Server Controls and State |
|
|
102 | (6) |
|
Form Post Data and ASP.NET Controls |
|
|
108 | (7) |
|
The IPostBackDataHandler Interface |
|
|
108 | (1) |
|
|
109 | (2) |
|
Using the Textbox Control |
|
|
111 | (4) |
|
|
115 | (6) |
|
ViewState Is Now Application User State |
|
|
115 | (1) |
|
New TextBox3d Demonstration Web Form |
|
|
116 | (2) |
|
Adding Control State to TextBox3D |
|
|
118 | (3) |
|
|
121 | (2) |
|
The WebControl Base Class and Control Styles |
|
|
123 | (60) |
|
Customizing the Appearance of Controls |
|
|
123 | (1) |
|
HTML: Content and Appearance |
|
|
124 | (6) |
|
|
124 | (1) |
|
Styling Using Cascading Style Sheets |
|
|
124 | (3) |
|
Style Properties and Visual Studio |
|
|
127 | (3) |
|
WebControl and Control Styling |
|
|
130 | (19) |
|
WebControl's ControlStyle Property |
|
|
131 | (1) |
|
WebControl Top-Level Style Properties |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (1) |
|
|
134 | (1) |
|
The AddAttributes ToRender()Method |
|
|
135 | (1) |
|
|
136 | (3) |
|
The Web Control Style Web Form |
|
|
139 | (8) |
|
Styles, HTML 3.2, and Down-Level Browsers |
|
|
147 | (2) |
|
Down-Level Browser Style Rendering Behind the Scenes |
|
|
149 | (1) |
|
|
149 | (17) |
|
The Styled InputBox Control |
|
|
149 | (3) |
|
LabelStyle and TextBoxStyle |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (4) |
|
The InputBox Style Web Form |
|
|
158 | (5) |
|
Applying the LabelStyle and TextBoxStyle Settings |
|
|
163 | (3) |
|
Creating a Custom Style Class |
|
|
166 | (15) |
|
The CursorStyle Enumeration |
|
|
166 | (5) |
|
|
171 | (1) |
|
Rendering the FancyLabel Control |
|
|
172 | (2) |
|
The FancyLabel Style Web Form |
|
|
174 | (4) |
|
The StyleCollection Class |
|
|
178 | (3) |
|
|
181 | (2) |
|
|
183 | (70) |
|
Events and ASP.NET Controls |
|
|
183 | (1) |
|
The Need for Events in ASP.NET |
|
|
183 | (2) |
|
The .NET Framework Event Model |
|
|
185 | (6) |
|
|
186 | (4) |
|
|
190 | (1) |
|
System.EventHandler Delegate |
|
|
190 | (1) |
|
Invoking an Event in a Control |
|
|
191 | (1) |
|
Adding an Event to the TextBox Control |
|
|
191 | (7) |
|
Enhancing the TextBox Control with a TextChanged Event |
|
|
191 | (3) |
|
Using the TextBox Control on a Web Form |
|
|
194 | (4) |
|
|
198 | (9) |
|
Creating a TextChangedEventArgs Class |
|
|
198 | (1) |
|
Creating a TextChangedEventHandler Delegate |
|
|
199 | (1) |
|
Adding an Event to the CustomEventTextBox Control |
|
|
200 | (3) |
|
Using the CustomEventTextBox Control on a Web Form |
|
|
203 | (4) |
|
Capturing Postback with the Button Control |
|
|
207 | (4) |
|
|
207 | (2) |
|
Exposing a Click Event and the Events Collection |
|
|
209 | (2) |
|
Command Events and Event Bubbling |
|
|
211 | (1) |
|
Exposing the Command Event |
|
|
211 | (13) |
|
Capturing the Postback via IPostBackEventHandler |
|
|
213 | (4) |
|
Using the SuperButton Control on a Web Form |
|
|
217 | (7) |
|
Composing the SuperButton Control into a Composite Pager Control |
|
|
224 | (13) |
|
Building the Pager Child Control Hierarchy |
|
|
224 | (2) |
|
Defining the PageCommand Event |
|
|
226 | (1) |
|
Exposing the PageCommand Event from the Pager Control |
|
|
227 | (1) |
|
Capturing the Bubbles via OnBubbleEvent |
|
|
228 | (1) |
|
The INamingContainer Interface |
|
|
229 | (4) |
|
Using the Pager Control on a Web Form |
|
|
233 | (4) |
|
|
237 | (13) |
|
Plugging Into the Life Cycle |
|
|
238 | (1) |
|
The Lifecycle Server Control |
|
|
239 | (1) |
|
Life Cycle and the HTTP Protocols GET and Post |
|
|
239 | (8) |
|
HTTP post Request via Postback |
|
|
247 | (3) |
|
|
250 | (3) |
|
|
253 | (28) |
|
Customized Control Content |
|
|
253 | (1) |
|
|
254 | (14) |
|
The ParseChildren Attribute |
|
|
254 | (2) |
|
A Menu Control with Templates |
|
|
256 | (1) |
|
|
257 | (1) |
|
Creating the Header Section |
|
|
258 | (2) |
|
Creating the Footer Section |
|
|
260 | (1) |
|
Creating the Hyperlink Section |
|
|
260 | (6) |
|
Viewing the TemplateMenu Control |
|
|
266 | (2) |
|
Checking the Rendered HTML |
|
|
268 | (1) |
|
Parsing Data from the Control Tags |
|
|
268 | (12) |
|
|
268 | (5) |
|
|
273 | (5) |
|
Viewing the Tag Parsing Menu Controls |
|
|
278 | (2) |
|
|
280 | (1) |
|
Server Control Data Binding |
|
|
281 | (66) |
|
Customized Control Content |
|
|
282 | (41) |
|
|
282 | (1) |
|
DataBinding Base Class Options |
|
|
282 | (1) |
|
|
283 | (29) |
|
Data Binding with the Repeater Control |
|
|
312 | (6) |
|
Advanced Interaction with the Repeater Control |
|
|
318 | (5) |
|
|
323 | (21) |
|
The Dynamic Templates Web Form |
|
|
323 | (6) |
|
Implementing the ITemplate Interface |
|
|
329 | (5) |
|
CompositeDataBoundControl |
|
|
334 | (10) |
|
|
344 | (3) |
|
Integrating Client-Side Script |
|
|
347 | (66) |
|
Client-Side Script Server Control Scenarios |
|
|
347 | (1) |
|
Handling Client-Side Events |
|
|
348 | (18) |
|
|
350 | (2) |
|
Handling Mouse Events for Image Rollovers |
|
|
352 | (10) |
|
The RolloverImage Web Form |
|
|
362 | (4) |
|
Running a Client Script When a Form Is Submitted |
|
|
366 | (8) |
|
The FormConfirmation Control |
|
|
366 | (1) |
|
The ConfirmedLinkButton Control |
|
|
367 | (2) |
|
|
369 | (5) |
|
Integrating Client-Side and Server-Side Events |
|
|
374 | (21) |
|
The UpDown Server Control |
|
|
374 | (18) |
|
|
392 | (3) |
|
|
395 | (17) |
|
|
396 | (1) |
|
|
396 | (8) |
|
The StockNews Callback Control |
|
|
404 | (8) |
|
|
412 | (1) |
|
ASP.NET AJAX Controls and Extenders |
|
|
413 | (28) |
|
|
413 | (3) |
|
|
414 | (1) |
|
SimpleUserControlAJAX Demonstration |
|
|
414 | (2) |
|
ASP.NET AJAX Extensibility |
|
|
416 | (10) |
|
The GetScriptReferences Method |
|
|
417 | (1) |
|
The GetScriptDescriptors Method |
|
|
418 | (1) |
|
ASP.NET AJAX Client Script |
|
|
419 | (1) |
|
|
419 | (7) |
|
ASP.NET AJAX Server Controls |
|
|
426 | (14) |
|
The TextCaseExtender Control |
|
|
426 | (2) |
|
The TextCaseBehavior Client-Side Component |
|
|
428 | (4) |
|
The HighlightedHyperLink ASP.NET AJAX Server Control |
|
|
432 | (3) |
|
The HighlightedHyperlink Client-Side Component |
|
|
435 | (5) |
|
|
440 | (1) |
|
|
441 | (82) |
|
Web-Part-Based Web Site Development |
|
|
441 | (1) |
|
|
442 | (35) |
|
|
442 | (1) |
|
|
443 | (33) |
|
Web Part Development Tips |
|
|
476 | (1) |
|
Adaptive Control Behavior |
|
|
477 | (25) |
|
Nonmobile Adaptive Behavior |
|
|
477 | (5) |
|
|
482 | (5) |
|
Browsing Mobile Web Forms |
|
|
487 | (1) |
|
Customizing and Implementing Mobile Controls |
|
|
488 | (3) |
|
Templates and Device-Specific Choices |
|
|
491 | (1) |
|
The DeviceSpecific.aspx Mobile Web Page |
|
|
491 | (1) |
|
|
492 | (1) |
|
The DeviceSpecific and Choice Elements |
|
|
493 | (1) |
|
Filter Attribute and deviceFilters Configuration |
|
|
494 | (1) |
|
MobileCapabilities, browserCaps, and Device Update 2 |
|
|
495 | (2) |
|
New Capabilities in MobileCapabilities |
|
|
497 | (5) |
|
|
502 | (2) |
|
|
503 | (1) |
|
Miniaturizing the Header and Footer |
|
|
503 | (1) |
|
Hosting the Header and Footer User Controls |
|
|
504 | (1) |
|
|
504 | (17) |
|
Rendering the Mobile Control |
|
|
505 | (2) |
|
The Mobile Control Life Cycle |
|
|
507 | (4) |
|
|
511 | (1) |
|
|
511 | (1) |
|
Inheriting from MobileControl |
|
|
511 | (8) |
|
|
519 | (2) |
|
|
521 | (2) |
|
|
523 | (54) |
|
|
523 | (1) |
|
|
523 | (4) |
|
Environment Services Overview |
|
|
524 | (2) |
|
Customizing Component Behavior |
|
|
526 | (1) |
|
|
527 | (1) |
|
The TitledThumbnail Control |
|
|
527 | (18) |
|
The TitledThumbnail Control at Design Time |
|
|
532 | (6) |
|
|
538 | (7) |
|
|
545 | (5) |
|
The SimpleTextEditor Editor |
|
|
545 | (3) |
|
|
548 | (2) |
|
|
550 | (8) |
|
The Component Editor Dialog Box |
|
|
550 | (5) |
|
The Component Editor Class |
|
|
555 | (3) |
|
|
558 | (15) |
|
The Control Designer and Designer Verbs |
|
|
560 | (4) |
|
The Templated Control Designer |
|
|
564 | (4) |
|
The Data-Bound Control Designer |
|
|
568 | (5) |
|
Miscellaneous Design-Time Items |
|
|
573 | (1) |
|
|
573 | (1) |
|
Debugging Design-Time Development |
|
|
573 | (1) |
|
|
574 | (3) |
|
Building a Complex Control |
|
|
577 | (80) |
|
|
577 | (1) |
|
The Live Search Web Service |
|
|
578 | (5) |
|
Web Services Description Language and .NET Web Service Proxies |
|
|
579 | (4) |
|
Creating the Control Library Project |
|
|
583 | (3) |
|
Strong-Named Assemblies and Versioning Attributes |
|
|
584 | (1) |
|
Bin Directory or Global Assembly Cache Deployment |
|
|
584 | (1) |
|
Additional Assembly Attributes |
|
|
585 | (1) |
|
Configuring the Search Settings |
|
|
586 | (7) |
|
Crafting the Configuration Section XML |
|
|
586 | (1) |
|
Registering the Configuration Section |
|
|
587 | (2) |
|
Building a Configuration Section Handler Class |
|
|
589 | (2) |
|
Wrapping the Web Service Proxy in a Utility Method |
|
|
591 | (2) |
|
Designing the Control Architecture |
|
|
593 | (2) |
|
|
595 | (9) |
|
|
596 | (8) |
|
|
604 | (39) |
|
|
605 | (4) |
|
Building the Result Control |
|
|
609 | (2) |
|
Creating a Control Hierarchy for Data Binding or Postback |
|
|
611 | (3) |
|
Creating Resultltem Controls |
|
|
614 | (2) |
|
Creating the Child Pager Control |
|
|
616 | (1) |
|
|
617 | (1) |
|
Styling the Result Control |
|
|
618 | (25) |
|
|
643 | (12) |
|
Creating the Pager Results |
|
|
644 | (1) |
|
Creating the Pager's Previous Button |
|
|
645 | (1) |
|
Creating the Pager's Bar Pages |
|
|
646 | (1) |
|
Creating the Pager's Next Button |
|
|
647 | (1) |
|
Ensuring Pager's Style Rendering |
|
|
648 | (7) |
|
|
655 | (2) |
|
|
657 | (56) |
|
|
657 | (14) |
|
Designers and Dummy Data Source |
|
|
657 | (9) |
|
Template Support in the Result Control |
|
|
666 | (4) |
|
|
670 | (1) |
|
Testing the Live Search Controls |
|
|
671 | (6) |
|
The Default Look and Feel |
|
|
671 | (3) |
|
Customizing the Live Search Controls' Appearance |
|
|
674 | (3) |
|
|
677 | (19) |
|
|
678 | (3) |
|
|
681 | (2) |
|
|
683 | (2) |
|
The RsaLicenseDataAttribute Custom Attribute |
|
|
685 | (1) |
|
Adding Licensing to the Search and Result Controls |
|
|
686 | (2) |
|
The RsaLicenseProvider Class |
|
|
688 | (8) |
|
Globalization and Localization |
|
|
696 | (13) |
|
|
696 | (1) |
|
The ResourceManager Class |
|
|
697 | (3) |
|
Culture Types and Localizing Resource Files |
|
|
700 | (2) |
|
Satellite Assemblies and Resource Fallback |
|
|
702 | (2) |
|
Setting Thread Culture in the Global.asax File |
|
|
704 | (1) |
|
Viewing a Localized Web Form |
|
|
705 | (4) |
|
Code Analysis for Managed Code |
|
|
709 | (2) |
|
|
711 | (1) |
|
|
712 | (1) |
Index |
|
713 | |