Training
Certifications
Books
Special Offers
Community




 
Developing Microsoft® ASP.NET Server Controls and Components
Author Nikhil Kothari and Vandana Datye
Pages 724
Disk N/A
Level Int/Adv
Published 08/28/2002
ISBN 9780735615823
Price $59.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Companion Content
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Table of Contents


    Forewordxvii
    Acknowledgmentsxix
    Introductionxxi
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 Control59
    Converting a Page to a User Control60
        Accessing a User Control from a Page62
    Reusable User Controls: The SiteHeader and SiteFooter Examples64
    The User Control Model67
        User Controls in Visual Studio .NET68
    Deploying a User Control73
    An Application-Specific User Control: The CruiseSelector Example73
    Relative URLs in User Controls77
    Programmatically Instantiating a User Control79
    Caching a User Control80
        VaryByControl Example83
        How User Control Caching Works85
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  Rendering141
    Base Classes and Rendering142
    Rendering Methods of the Control Class143
        Page Rendering144
    Overriding Render—The MetaTag Control Example145
    HtmlTextWriter and Related Enumerations148
        HtmlTextWriterTag Enumeration149
        HtmlTextWriterAttribute Enumeration149
        HtmlTextWriterStyle Enumeration149
    Rendering Methods of WebControl149
    Rendering a Web Control—The HoverLabel Example151
    Exercising HtmlTextWriter—The LoginUI Example155
    Downlevel Rendering167
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 Overview275
    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 Controls359
    Validation Architecture—IValidator, BaseValidator, and CustomValidator360
    The Validation Framework362
        Validator Controls Provided by ASP.NET362
        Using Validation in a Page362
        How the Page Performs Validation363
        Client-Side Validation364
        The ValidationSummary Control364
    Validating Text Entry—The StringValidator Example365
15  Design-Time Functionality375
    .NET Framework Design-Time Architecture376
    Type Converters380
        TypeConverterAttribute381
    Designers381
        Composite Control Designers—The CompositeControlDesigner Example384
        Templated Control Designers—The ContactInfoDesigner Example386
        Read-Write Control Designers—The ScrollablePanelDesigner Example394
        Designer Verbs399
        DesignerAttribute399
    UI Type Editors401
        String Editor Example401
        Collection Editor Examples406
        EditorAttribute407
    Component Editors408
        The MyLabelComponentEditor Example408
        Designer Verb That Initiates Component Editing415
    Debugging Design-Time Code418
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 Services489
    XML Web Services Overview489
    Developing an XML Web Service—The StockWebService Example490
        Implementing the Web Service491
        Deploying the Web Service497
        Developing Web Service Client Proxies499
    XML Web Service-Based Server Controls—The StockGrid Example500
        Implementing the Server Control502
        Implementing the Control Designer515
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 Controls553
    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 Attributes633
B  Object Model for Common Classes643
C  Microsoft ASP.NET Web Matrix653
INDEX661



Last Updated: August 27, 2002
Top of Page