買這商品的人也買了...
-
$580$493 -
$680$578 -
$980$833 -
$970Introduction to Algorithms, 2/e
-
$580$458 -
$600$510 -
$720$612 -
$560$476 -
$1,890$1,796 -
$690$587 -
$620$527 -
$780$741 -
$650$553 -
$760$600 -
$590$466 -
$280$238 -
$750$585 -
$1,400$1,372 -
$680$578 -
$690$538 -
$780$663 -
$720$612 -
$750$638 -
$560$476 -
$480$379
相關主題
商品描述
Description:
The complete guide to developing professional, reusable ASP.NET server controls and components—direct from the insiders who developed the technology
Web Forms—the Page and Control Framework at the heart of ASP.NET—makes it easier to develop dynamic Web applications. But you can go beyond the controls that ship with ASP.NET—and power up your Web sites and applications—by creating your own server controls. You can also develop and distribute your own controls for commercial use. This comprehensive guide, direct from key insiders who really know the technology, combines conceptual and architectural details with practical, how-to information and real-world code samples to show exactly how to create custom, reusable, professional-quality server controls with rich design-time functionality. It also provides essential information about configuration and the HTTP runtime, packaging, deployment, debugging, and developing controls that incorporate XML Web services, plus other vital topics. And it introduces the ASP.NET Web Matrix tool for creating Web applications and for using server controls. Topics covered include:
OVERVIEW
• ASP.NET page programming
• Component programming
SERVER CONTROLS
• User controls
• Implementing properties
• View state management
• Rendering
• Control life cycle
• Events and Postback
• Styles
• Composite, validator, and data-bound controls
• Client-side behavior
• Design-time functionality
• Localization, licensing, and deployment
SERVER COMPONENTS
• XML Web services
• HTTP handlers
SERVER CONTROL CASE STUDIES
• Templated data-bound controls
• DHTML-based server controls
“[This book] is a must-have for all serious ASP.NET component developers.”
–Scott Guthrie, Product Unit Manager, Microsoft ASP.NET Product Team
Table of Contents:
Foreword | xvii |
Acknowledgments | xix |
Introduction | xxi |
PART I OVERVIEW | |
1 ASP.NET Overview | 3 |
The .NET Framework | 3 |
The Common Language Runtime | 4 |
The .NET Framework Class Library | 5 |
A Quick Tour of ASP.NET | 6 |
HTTP Runtime—Request Processing in an ASP.NET Application | 8 |
Extending ASP.NET | 10 |
2 Page Programming Model | 13 |
A Sample Page | 14 |
Server Controls | 15 |
ASP.NET Server Control Hierarchy | 18 |
ASP.NET Web Controls | 18 |
Why Write Server Controls? | 19 |
From Text to Controls | 21 |
Code Model | 22 |
Page Execution Model | 23 |
ASP.NET Pages in a Visual Designer | 26 |
3 Component Programming Overview | 29 |
Managed Component Overview | 30 |
Properties | 31 |
The Property Construct | 32 |
Naming Guidelines for Properties | 36 |
Advantages of Properties | 36 |
Methods | 37 |
Implementing Methods Instead of Properties | 37 |
Naming Guidelines for Methods and Method Parameters | 38 |
Events | 39 |
Delegates | 39 |
Event Delegates | 42 |
Raising an Event | 44 |
Event Sample | 46 |
Metadata Attributes | 51 |
Applying Attributes | 52 |
Designable Components | 53 |
Controls | 54 |
PART II SERVER CONTROLS—FIRST STEPS | |
4 User Controls: From Page to Control | 59 |
Converting a Page to a User Control | 60 |
Accessing a User Control from a Page | 62 |
Reusable User Controls: The SiteHeader and SiteFooter Examples | 64 |
The User Control Model | 67 |
User Controls in Visual Studio .NET | 68 |
Deploying a User Control | 73 |
An Application-Specific User Control: The CruiseSelector Example | 73 |
Relative URLs in User Controls | 77 |
Programmatically Instantiating a User Control | 79 |
Caching a User Control | 80 |
VaryByControl Example | 83 |
How User Control Caching Works | 85 |
5 Developing a Simple Custom Control | 87 |
Server Control Overview | 88 |
A Trivial Server Control Example | 89 |
Compiling and Deploying a Server Control | 90 |
Using a Custom Control on a Page | 92 |
Exposing a Property: The PrimeGenerator Control Example | 93 |
Deriving from WebControl | 96 |
Test Page for the PrimeGenerator Control | 97 |
Choosing the Base Class for Your Control | 99 |
Applying Design-Time Attributes | 100 |
Applying TagPrefixAttribute | 101 |
Custom Controls in Visual Studio .NET | 102 |
Adding a Custom Control to the Toolbox | 102 |
Using Custom Controls from the Toolbox | 103 |
Customizing the Toolbox Icon | 105 |
Debugging a Server Control | 106 |
6 Custom Controls vs. User Controls | 109 |
Deployment | 109 |
Authoring | 110 |
Content and Layout | 111 |
Design-Time Behavior | 112 |
Performance | 112 |
PART III SERVER CONTROLS—NUTS AND BOLTS | |
7 Simple Properties and View State | 117 |
View State and State Management | 118 |
Using ViewState as the Property Store—The ViewStateDemoLabel Example | 118 |
More About View State | 122 |
Declarative Persistence of Simple Properties | 125 |
Declarative Syntax for Enumeration Properties | 126 |
Properties Inherited from Control and WebControl | 127 |
Control Properties | 127 |
WebControl Properties | 128 |
Design-Time Attributes for Properties | 130 |
Overriding an Attribute | 132 |
Putting It Together—The PageTracker Example | 132 |
Page That Uses the PageTracker Control | 138 |
8 Rendering | 141 |
Base Classes and Rendering | 142 |
Rendering Methods of the Control Class | 143 |
Page Rendering | 144 |
Overriding Render—The MetaTag Control Example | 145 |
HtmlTextWriter and Related Enumerations | 148 |
HtmlTextWriterTag Enumeration | 149 |
HtmlTextWriterAttribute Enumeration | 149 |
HtmlTextWriterStyle Enumeration | 149 |
Rendering Methods of WebControl | 149 |
Rendering a Web Control—The HoverLabel Example | 151 |
Exercising HtmlTextWriter—The LoginUI Example | 155 |
Downlevel Rendering | 167 |
9 Control Life Cycle, Events, and Postback | 173 |
Control Life Cycle | 174 |
Events in Server Controls | 183 |
Declarative Syntax for Event Wiring | 184 |
Postback Architecture | 185 |
Mapping a Postback Event to a Server Event—The IPostBackEventHandler Interface | 186 |
Implementing IPostBackEventHandler—The SimpleButton Example | 187 |
Optimizing Event Implementation | 191 |
Generating Client-Side Script for Postback | 194 |
Rendering Multiple Elements That Use Client Script for Postback—The NavButtons Example | 199 |
IPostBackDataHandler and Postback Data | 203 |
Processing Postback Data—The SimpleTextBox Example | 204 |
Putting It Together—The Login Example | 207 |
Exposing Other Semantic Events—The HitTracker Example | 212 |
10 Complex Properties and State Management | 217 |
Subproperties | 218 |
Subproperties Persisted on a Control's Tag | 219 |
Inner Property Persistence | 220 |
Properties and Type Converters | 222 |
Implementing a Type Converter | 223 |
Putting It Together—The MapDemo Example | 236 |
State Management, IStateManager, and the ViewState Dictionary | 245 |
How a Page Serializes and Restores Its View State | 245 |
The IStateManager Interface | 246 |
The ViewState Property and Default State Management | 247 |
Implementing IStateManager in a Custom Type | 249 |
Collection Properties—The ImageMap Example | 255 |
Implementing State Management in a Collection Type—The HotSpotCollection Example | 264 |
Expando Attributes—The IAttributeAccessor Interface | 271 |
11 Styles in Control | 275 |
Styles Overview | 275 |
Overriding Style Properties—The Spreadsheet Example | 279 |
Implementing a Custom Typed Style—The MyPanelStyle Example | 283 |
12 Composite Controls | 293 |
Composite Controls—Key Concepts | 294 |
Implementing a Composite Control—The CompositeLogin Example | 296 |
APIs Related to Composite Controls | 308 |
View State and Child Controls | 310 |
Event Bubbling | 311 |
Styles in Composite Controls—The StyledCompositeLogin Example | 313 |
Templated Controls Overview | 320 |
Implementing a Templated Control—The ContactInfo Example | 321 |
Control Parsing and Control Builders | 331 |
13 Client-Side Behavior | 339 |
Browser Capabilities and Client-Side Behavior | 340 |
Client Script-Related API | 341 |
Using Client Script and DHTML | 342 |
Deploying Client Files | 343 |
Putting It Together—The HtmlEditor Example | 345 |
14 Validator Controls | 359 |
Validation Architecture—IValidator, BaseValidator, and CustomValidator | 360 |
The Validation Framework | 362 |
Validator Controls Provided by ASP.NET | 362 |
Using Validation in a Page | 362 |
How the Page Performs Validation | 363 |
Client-Side Validation | 364 |
The ValidationSummary Control | 364 |
Validating Text Entry—The StringValidator Example | 365 |
15 Design-Time Functionality | 375 |
.NET Framework Design-Time Architecture | 376 |
Type Converters | 380 |
TypeConverterAttribute | 381 |
Designers | 381 |
Composite Control Designers—The CompositeControlDesigner Example | 384 |
Templated Control Designers—The ContactInfoDesigner Example | 386 |
Read-Write Control Designers—The ScrollablePanelDesigner Example | 394 |
Designer Verbs | 399 |
DesignerAttribute | 399 |
UI Type Editors | 401 |
String Editor Example | 401 |
Collection Editor Examples | 406 |
EditorAttribute | 407 |
Component Editors | 408 |
The MyLabelComponentEditor Example | 408 |
Designer Verb That Initiates Component Editing | 415 |
Debugging Design-Time Code | 418 |
16 Data-Bound Controls | 421 |
Data Binding Overview | 422 |
BindableAttribute and the DataBindings Property | 424 |
Implementing a Data-Bound Control | 424 |
The DataSource Property and Related Members | 433 |
Creating the Control Hierarchy—DataBind and CreateChildControls | 434 |
Styles and Rendering | 436 |
Implementing a Data-Bound Control Designer | 442 |
17 Localization, Licensing, and Other Miscellany | 451 |
Localization | 451 |
Using Resources in Controls | 452 |
Embedding and Accessing Resources | 456 |
Localizing Metadata Attributes | 460 |
Licensing | 463 |
ServerLicenseProvider | 467 |
ExpiringLicenseProvider | 473 |
EncryptedLicenseProvider | 475 |
Configurable Properties | 477 |
Deployment | 483 |
PART IV SERVER COMPONENTS | |
18 XML Web Services | 489 |
XML Web Services Overview | 489 |
Developing an XML Web Service—The StockWebService Example | 490 |
Implementing the Web Service | 491 |
Deploying the Web Service | 497 |
Developing Web Service Client Proxies | 499 |
XML Web Service-Based Server Controls—The StockGrid Example | 500 |
Implementing the Server Control | 502 |
Implementing the Control Designer | 515 |
19 HTTP Handlers | 519 |
HTTP Handler Overview | 519 |
The IHttpHandler Interface | 521 |
The IHttpHandlerFactory Interface | 522 |
The "Hello, World" HTTP Handler Example | 522 |
Handling a New Extension—The XmlHandler Example | 525 |
Dynamic Images—The ImageLabelHandler Example | 532 |
The ImageLabel Control and Designer | 538 |
HTTP Handlers and Session State | 548 |
PART V SERVER CONTROL CASE STUDIES | |
20 Data-Bound Templated Controls | 553 |
The ListView Control | 554 |
ListView Specification | 557 |
ListView Implementation | 558 |
Data-Bound Controls | 559 |
Templates | 568 |
Styles and State Management | 571 |
Rendering | 575 |
Events | 580 |
Client Script Functionality | 585 |
Design-Time Attributes | 587 |
Designer Implementation | 590 |
21 DHTML-Based Server Controls | 603 |
The DatePicker Control | 604 |
DatePicker Specification | 607 |
DatePicker and DatePickerDesigner Implementation | 608 |
Composite Control | 608 |
Delegated Properties | 610 |
Styles and State Management | 612 |
Client Script Functionality | 615 |
Rendering | 620 |
Events | 622 |
Validation | 624 |
Design-Time Attributes | 625 |
Designer Implementation | 627 |
PART VI APPENDIXES | |
A Metadata Attributes | 633 |
B Object Model for Common Classes | 643 |
C Microsoft ASP.NET Web Matrix | 653 |
INDEX | 661 |
商品描述(中文翻譯)
描述:
這是一本完整的指南,教你如何開發專業的、可重用的 ASP.NET 伺服器控制項和元件——直接來自開發這項技術的內部人士。
Web Forms——ASP.NET 的核心頁面和控制框架——使得開發動態 Web 應用程式變得更容易。但你可以超越隨 ASP.NET 附帶的控制項,通過創建自己的伺服器控制項來增強你的網站和應用程式。你還可以開發並分發自己的控制項以供商業使用。這本全面的指南,直接來自真正了解這項技術的關鍵內部人士,結合了概念和架構細節,提供實用的操作資訊和真實的程式碼範例,展示如何創建自定義的、可重用的、專業品質的伺服器控制項,並具備豐富的設計時功能。它還提供有關配置和 HTTP 執行時、打包、部署、除錯以及開發包含 XML Web 服務的控制項等其他重要主題的基本資訊。此外,它介紹了 ASP.NET Web Matrix 工具,用於創建 Web 應用程式和使用伺服器控制項。涵蓋的主題包括:
概述
• ASP.NET 頁面程式設計
• 元件程式設計
伺服器控制項
• 使用者控制項
• 實作屬性
• 檢視狀態管理
• 渲染
• 控制項生命週期
• 事件和回傳
• 樣式
• 複合、驗證和資料綁定控制項
• 客戶端行為
• 設計時功能
• 本地化、授權和部署
伺服器元件
• XML Web 服務
• HTTP 處理程式
伺服器控制項案例研究
• 模板化資料綁定控制項
• 基於 DHTML 的伺服器控制項
“[這本書] 是所有認真對待 ASP.NET 元件開發者的必備書籍。”
– Scott Guthrie,微軟 ASP.NET 產品團隊產品單位經理
目錄:
前言
xvii
致謝
xix
介紹
xxi
第一部分 概述
1 ASP.NET 概述
3
.NET 框架
3
公共語言執行時
4
.NET 框架類別庫
5
ASP.NET 快速導覽
6
HTTP 執行時——ASP.NET 應用程式中的請求處理
8
擴展 ASP.NET
10
2 頁面程式設計模型
13
範例頁面
14
伺服器控制項
15
ASP.NET 伺服器控制項層級
18
ASP.NET Web 控制項
18
為什麼要編寫伺服器控制項?
19
從文字到控制項
21
程式碼模型
22
頁面執行模型
23
在視覺設計器中使用 ASP.NET 頁面
26
3 元件程式設計概述
29
受管理元件概述
30
屬性
31
屬性結構
32
屬性命名準則
36
屬性的優勢
36
方法
37
實作方法而非屬性
37
方法和方法參數的命名準則
38
事件
39
委派
39
事件委派
42
引發事件
44
事件範例
46
元資料屬性
51
應用屬性
52
可設計元件
53
控制項
54
第二部分 伺服器控制項——第一步
4 使用者控制項:從頁面到控制項
59
將頁面轉換為使用者控制項
60
從頁面訪問使用者控制項
62
可重用的使用者控制項:SiteHeader 和 SiteFooter 範例
64
使用者控制項模型
67
在 Visual Studio .NET 中的使用者控制項
68
部署使用者控制項
73