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

 

Index


Send feedback about this index to mspindex@microsoft.com

Symbols
<% %> (data binding syntax), 422
~ (tilde), 66

A
accessor methods, 93
AddAttributesToRender method, 278-79, 286, 291
ADO.NET
   class library, 5-6
   data tables. See DataSets
Application objects
   PageTracker example, 132-40
   view state with, 124-25
application-specific user controls, 73-76
.ascx extension
   HTTP handlers for, 520-21
   user control model, 59
.ashx files, 520, 524
.asmx extension, 490, 520
ASP (Active Server Pages)
   .NET. See ASP.NET
   Response.Write, 142
   server-side includes, 60
ASP.NET
   defined, 3
   extensibility of, 10-11
   namespaces, table of, 7
   request processing, 8-10
   Web Matrix. See Web Matrix
   XML Web services. See Web services
.aspx files
   example, simple, 14
   HTTP handlers, 520-21
   parsing of, 21-22
assemblies
   AssemblyInfo.cs file, 484-85
   attributes, 92
   custom controls, 90-92
   full names, 483-84
   GAC. See GAC (Global Assembly Cache)
   key pairs for, 484
   locations of, 91
   private, 91-92, 483
   satellite. See satellite assemblies
   shared. See shared assemblies
   signing, 484
   stingily named, 484
   user control model, 60, 67-68
assembly qualified type names, 400
AssemblyResourceManager example, 458-60
attributes, metadata
AddAttributesToRender method, 278-79, 286, 291
   applying, 52-53
   association of functionality, 639-40
   BindableAttribute, 634
   BrowsableAttribute, 51-52, 130, 132, 137-38, 590, 634
   CategoryAttribute, 131, 634-35
   class-level, 52-53
   complex properties with, 218-22
   ControlBuilderAttribute, 640
   custom controls, adding to, 100-102
   DatePicker control example, 625-27
   declarations, 51-52
   declarative specification by users, 271-73
   DefaultEventAttribute, 635
   DefaultPropertyAttribute, 100, 635
   DefaultValueAttribute, 131, 636
   DescriptionAttribute, 635
   design time, 52
   DesignerAttribute, 639
   DesignerSerializationVisibilityAttribute, 131, 137, 637
   design-time, 130-31, 633-40
   EditorAttribute, 639
   EditorBrowsableAttribute, 636
   event-level, 53
   expando attributes, 271-73
   localization of attributes, 460-63
   LocalizedDescriptionAttribute example, 460-62
   meanings of, 131
   metadata, 51-52
   NotifyParentPropertyAttribute, 637
   overriding, 131
   ParseChildrenAttribute, 640-41
   parse-time, 640-41
   PersistChildrenAttribute, 637-38
   PersistenceModeAttribute, 638
   property-level, 53
   rendering, 165, 167
   run-time, 52
   sealed attributes, 462
   serialization, 636-39
   TagPrefixAttribute, 62, 92, 101-2, 638-39
   TemplateContainerAttribute, 641
   ToolboxDataAttribute, 100
   TypeConverterAttribute, 640
authoring custom vs. user controls, 110-11

B
Base Class Library (BCL), 5
battery event sample, 46-51
BCL (Base Class Library), 5
Begin Tracking View State phase, 175, 176, 310
binary data generation with HTTP handlers, 532
BindableAttribute, 424, 634
binding data. See data binding; data-bound controls
bitmaps for icons, 105
Browsable attribute
   characteristics of, 634
   overriding, 132
   PageTracker control example and, 137-38
   purpose of, 130, 590
   syntax for use, 51-52
browsers
   Browser property of HttpRequest objects, 340
   DHTML capabilities, 603
   discovering versions of, 340
   graceful degradation of client controls, 340
   HTML 3.2, rendering, 167-70
   HTML editing feature, 345
   Internet Explorer, 345, 603
   validation, version dependent, 364
   variation, hiding of by server controls, 16
   versions, detection of, 169, 352
bubbling events
   Command event of Button, 296, 304
   enabling, 312
   handling, 312-13
   initiating, 313
   ListView control example, 580-85
   purpose of, 311
Button controls
   bubbling Command event, 296, 304
   postback function from, 294, 296

C
C# documentation comments, 650-51
CachedUserControl.ascx example, 83-84
caching
   CachedUserControl.ascx example, 83-84
   content for HTTP handlers, 528
   Duration attribute, 81
   fragment, 113
   IBuySpy Web site, 81
   licensing, support for, 467, 472
   OutputCache directive, 81-83, 85
   System.Web.Caching namespace, 7
   user controls, 80-85
   VaryByControl attribute, 82, 83-85
   VaryByCustom attribute, 82-83
   VaryByParam attribute, 81-82
   Web services, 500
calendar control example. See DatePicker control example
callbacks, delegates for, 39
camel casing, 38
casing
   camel, 38
   methods, 38
   parameters of methods, 38
   Pascal casing, 36
   properties, 36
CategoryAttribute, 131, 462-63, 634-35
cell phones. See mobile controls namespace
child controls. See also composite controls
   adding to container controls, 394
   CreateChildControls method, 294, 309, 311, 323, 327
   data-bound controls with, 423, 426
   delegated properties, 610-12
   ParseChildrenAttribute, 640-41
   PersistChildrenAttribute, 637-38
   rendering process, 144-47
   styles, applying to, 313-20, 575
   URL resolving with, 77-79
   view state management, 309-11, 319
CircleHotSpot.cs example, 254-55
class libraries
   ADO.NET, 5-6
   Base Class Library, 5
   component model layer, 6
   components of, 4
   custom controls as, 110
   design guidelines, 29
   GDI+, 6
   purpose of, 5-6
   Windows Forms, 6
   XML (Extensible Markup Language), 6
classes, user control model, 59-60, 67-68
class-level attributes, 52-53
Click events, 187-91
clicking, selection, enhanced model, 585
client proxies, Web services, 499-500, 514
client scripts
   API for, 341
   DatePicker control example, 615-20
   features, disabling, 340
   libraries, 343-44
   ListView control example, 585-87
   postbacks, causing, 194-202
   script tags, 352
   turning off functionality of, 619
ClientID property
   composite controls with, 308
   defined, 341
   purpose of, 127
client-side behavior
   adding to TextBox controls, 351-54
   browser version detection, 340, 352
   ClientID property, 341
   DatePicker control example, 615-20
   degrading gracefully, 339-40, 351
   deploying client files, 343-45, 353
   DetermineRenderClientScript method, 352
   DHTML with, 342-43
   enabling client scripts, 352
   file references, 352-53
   files, location of, 344
   GetClientFileUrl method, 353
   .htc files, 343
   HtmlEditor example, 345-58
   installing files, 344
   IsClientScriptBlockRegistered method, 341
   ListView control example, 585-87
   OnPreRender method, 352, 619
   postbacks, 353
   Pre-Render phase, 341
   purpose of, 339
   Register methods, 342, 352
   RegisterClientScriptBlock method, 341
   rendering, 352-54
   script features, disabling, 340
   script libraries, 343-44
   script tags, 352
   script-related API, 341
   tags with own object model, 343
   validation, 364, 373
client-side scripts. See client scripts
CLR (common language runtime), 4-5
CLS (common language specification), 31
code
   code editor, Visual Studio .NET, 27-28
   model, benefits of, 22-23
   viewing generated, 26
code-behind
   defined, 22
   mixing models, errors from, 70
   page code-behind, 73
   user controls and, 67-73
   Visual Studio .NET and, 23
collection
   verbs, 399
collection editors
   operation of, 406-8
   property editing, 258-59
collection properties
   displaying in browser, 258
   editors, 258-59, 406-8
   ImageMap example, 255-64
   inner default property persistence, 221-22
   view state management, 269-71
collection types, state management in, 264-71
collections
   composite control, 309
   editors, 258-59, 406-8
   HotSpotCollection class, 265-69
   management methods, 269-70
   properties of. See collection properties
   view state management, 269-71
color
   Color type, 276
   ColorBuilder class, 415
   HTML 3.2-specific tagging, 168
   type converter for, 126
   UI type editors for picking, 401-6
   WebControl class properties, 129-30
Command events, bubbling of, 311-13
comments, C# documentation, 650-51
commercially developing controls, 113
common language runtime. See CLR (common language runtime)
common language specification. See CLS (common language specification)
CompareValidator controls, 362
compiling
   csc command, 91
   culture-specific resources, 456-57
   custom controls, 90-92
   key pairs, including, 484
   options, 91
   resources, including, 105
   server controls, 90-92
complex properties
   child element parsing, 220
   CircleHotSpot.cs example, 254-55
   collection management methods, 269-70
   collection property persistence, 221-22
   collection type state management, 264-71
   control tags, persisting on, 219-20, 242
   defined, 117-18
   design-time attributes for, 242-43
   dirty properties, 247, 249, 253
   expando attributes, 271-73
   HotSpot.cs example, 249-55
   IAttributeAccessor, 271-73
   ImageMap example, 255-64
inner default property persistence, 221-22, 256, 264
   inner property persistence, 220-22
   IPostBackEventHandler, 244
   MapDemo example, 225-45
   metadata attributes for serialization, 218-22
   NotifyParentProperty attributes, 219, 637
   overhead reduction, collections, 271
   ParseChildren attribute, 220-22, 263, 331-36, 640-41
   PersistenceMode attribute, 221-22, 242, 264, 638
   read-only recommendation, 233-34, 243
   referencing subproperties, 219
   rendering, 243
   restoring after postback, 245-46
   serialization, 245-46
   state management, 245-55
   subproperties, 218-22
   type conversion, 218, 222-25
   view state, 245-55
   ViewState property as, 247-49
component editors
   associating with controls, 409
   ComponentDesigner class, 381-82
   ComponentEditor class, 409
   defined, 378, 408
   EditorAttribute, 409
   Form defining UI, 412
   interfaces for, 411
   launching, 415-17
   MyLabelComponentEditor example, 408-15
   MyLabelDesigner.cs, 416-17
   Property Builder command, 415
   relationships to design-time functionality, 379
   verbs for, 415-17
component model layer, 6
components
   ComponentDesigner class, 381-82
   ComponentEditor class, 409
   defined, 29-30
   designable. See designable components
   editors. See component editors
components, managed
   advantages of, 30-31
   advantages of component model, 29
   CLR, execution on top of, 30
   CLS, compliance with, 30
   components defined, 29
   delegates with, 39-44
   design guidelines, 29, 30-31
   designable, 53-55
   events with, 39-46
   metadata attributes with, 51-53
   methods using, 37-38
   object model, exposing, 30
   properties, using with, 31-37
composite controls
   APIs for, 308-9
   base class for, 305
   bubbling in. See bubbling events
   Button controls for postbacks, 294, 296
   child controls, instantiating, 294, 303
   ChildControlsCreated property, 309
   ClientIDs, 308
   CompositeLogin example, 296-308
   ControlCollection for, 308
   CreateChildControls method, 294, 309, 311, 323, 610
   CreateControlCollection method, 309
   DatePicker. See DatePicker control example
   defined, 293
   delegated properties, 610-12
   designers for, 305, 384-86
   EnsureChildControls method, 294, 303, 309
   FindControl method, 309
   HasControls method, 309
   INamingContainer, implementing, 294-95, 303, 305, 307-8, 610
   initializing child controls, 303
   InnerTextLabel example, 333-36
   key tasks for implementing, 294
   LiteralControls, 304
   LoadViewState method, 310
   naming containers, 308
   naming scope, 610
   order of child control creation, 311
   overriding default parsing logic, 331-37
   performance considerations, 295
   properties, exposing, 304
   rendering, 304
   SaveViewState method, 310
   StyledCompositeLogin control example, 314-20
   styles in, 313-20
   templated. See templated controls
   TextBox control for postbacks, 294, 296
   TrackViewState method, 310
   type converters for, 380
   UniqueIDs, 307-9
   view state management, 309
   Web services example, 513
CompositeControlDesigner.cs, 385
CompositeLogin example, 296-308
concatenating strings, 147
configurable properties
   ConfigurationSettings type, 482
   defined, 477
   design-time behavior, 483
   getters, 482
   implementation, 482
   look up of, 483
   name/value pairs for, 482
   PhoneNumberValidator example, 477-82
   purpose of, 477
   read/write properties, 482
   validation base class for, 482
   web.config files for, 478-79
configuration files
   configuration properties, 477-83
   HtmlTextWriter versioning, 168-69
   HTTP handler registration, 520
   machine.config, 168-69, 520
   web.config, 168-69, 520
ContactInfo control example, 321-31
ContactInfoDesigner example, 386-93
content
   custom control, 111
   customization. See templated controls
   defined, 111
   editing, attribute for allowing, 345
   nested, 331
   text rendering. See rendering
   user control, 111
context objects. See HttpContext objects
Context property, 128
control builders, 25, 332-37
Control class
   advantages of, 99
   ASP.NET architecture, relation to, 18
   bubble event methods, 312
   child control view states, 310-11
   events, life cycle, 183
   LoginUI example, 155-67
   object model listing, 643-44
   properties inherited from, 127-28
   rendering, choosing for, 142-43
   rendering, methods for, 143-45
   server control hierarchy, 88-89
   ViewState property, 118-25, 248-49
Control directives, user control model, 62, 70
control hierarchy
   data-bound controls, creating, 434-36
   event bubbling, 311-13
   view state of child controls, 310-11
control life cyle phases, 175. See also life cycles of controls
control trees
   Control class, 88-89
   defined, 10
   generated code, viewing, 26
   life cycle, role in, 174, 181-82
   page programming model, within, 25
   parsing Web pages, resulting from, 21-22
   rendering, 144
   server controls, 88-89
   ViewState dictionaries in, 122
ControlBuilder class, 332
ControlBuilderAttribute, 640
ControlCollection, composite controls with, 308
ControlDesigner class, object model listing, 649-50
controls
   base classes for, 54-55
   compiled, deployed as. See custom controls
   composite. See composite controls
   database. See data-bound controls
   defined, 54
   purpose of, 11
   server. See server controls
   templated. See templated controls
Controls property, 127
converting types
   associating with a type, 223, 381
   complex properties, required for, 218, 222-25
complex type declarative persistence, 218, 222-25
   custom type converters, 126, 223-25
   data-bound controls with, 380
   declarative persistence with, 125-26
   defined, 222
   design-time functionality, 377, 379-81, 596
   LosFormatter class with, 245-46
   MapDemo example, 225-45
   persistence with, 380
   string-to-value conversions, 229
   subproperty UIs with, 380
   TypeConverterAttribute, 381, 640
   view state using, 123
CreateChildControls method
   composite controls, 294, 309, 311, 323, 610
   data-bound controls, 423, 426, 434-36
   DatePicker control example, 610
   templated controls, 323, 327
CruiseSelector example, 73-76
CryptoStreams, 476
csc command, 91
CSS (Cascading Style Sheets)
   attributes, Style collection acceptance of, 278
   CssClass property, 129
   HTML 3.2-specific tagging, 167-70
culture specification. See localization
culture-neutral resources, 456-57
culture-specific resources, 456-57
custom controls
   adding from Toolbox, 103-5
   assemblies, 90-91
   Assembly attributes, 92
   attributes, design-time application, 100-102
   authoring, 110-11
   base class hierarchy, 88
   base classes, choosing from, 99-100
   compiling, 90-92
   content, dynamic, 111
   Control class, 88, 99-100
   debugging, 106-7
   DefaultPropertyAttribute, 100
   defined, 88
   deployment, 90-92, 110
   designing, 112
   design-time attribute application, 100-102
   .dll file extension, 92
   existing controls, deriving from, 99
   existing controls with, 111
   HtmlControls, deriving from, 99
   IComponent interface, 88-89
   icons, associating with, 105-6
   metadata, providing, 100-102
   namespaces, 92-93
   performance, 112
   PrimeGenerator example, 93-96
   private assemblies, 91-92
   properties, exposing, 93-96
   properties, setting, 104
   properties, WebControl class, 96-97
   recommendations for development, 113
   registering, 92, 102
   SimpleControl.cs example, 89
   state management. See view state
   StyledPrimeGenerator.cs example, 97, 104-5
   tag prefixes, 92
   TagPrefixAttribute, 101-2
   testing, 93, 97-99
   Toolbox, adding from, 103-5
   Toolbox, adding to, 102-3
   ToolboxDataAttribute, 100
   user control model, compared to, 109-13
   using on a page, 92-93
   WebControl class, 88-89, 99-100
   WebControl class properties, 96-97
CustomValidator, 361, 362

D
data binding
   <% %> (data binding syntax), 422
   Bindable attribute, 590
   controls with. See data-bound controls
   DataBind method, 422-23, 434, 558, 566
   DataBinding event, 422, 423, 434
   defined, 421
   model, 423
   OnDataBinding method, 422-23, 434
   page framework support for, 422-23
   server control capability, 17
data structures, 5
data-bound controls
   <% %> (data binding syntax), 422
   architecture of, 422-24
   Bindable attribute, 424, 634
   built-in, 421
   child control creation, 423, 426, 434-36
   control hierarchy creation, 434-36, 566-67
   CreateChildControls method, 423, 426, 434-36
   CreateControlHierarchy method, 434-36
   DataBind method, 422-23, 434, 558, 566
   DataBinding event, 422, 423, 434
   DataBoundTable control example, 424-32
   DataBoundTableDesigner example, 442-50
   DataMember property, 433, 443-44, 448-50
   DataSets, 433, 443
   DataSource property, 423, 426, 433, 443-44, 448-50, 565
   defined, 421
   designers for, 442-50, 590-96
   drop-down list display, 449
   enumerating data source objects, 566
   enumeration of data, 433
   GetDesignTimeHtml method, overriding, 444, 449
   IDataSourceProvider, 444, 449-50
   IEnumerable, 433
   IListSource, 433
   ListView control. See ListView control example
   OnDataBinding method, 422-23, 434
   page framework support for, 422-23
   parsing data-binding expressions, 422
   PreFilterProperties method, overriding, 444, 449, 596
   recommendation for, 113
   sample data source creation in designers, 443, 449
   shadowing, 442-43, 449
   ShowHeader property, 442
   sources, specifying, 423, 433
   style functionality, 426, 436-42
   templated. See data-bound templated controls
   UI for binding, 423
   view state of, 423, 434-35, 442
data-bound templated controls
   control hierarchy creation, 566-67
   DataBind method, 558, 566
   DataSet class with, 557
   DataSource property, 557-58, 565
   designer for, 587-96
   enumerating data source objects, 558, 566
   events raised, 580-85
   importance of, 553
   ListView control. See ListView control example
   ListViewText.aspx, 554-56
   metadata attributes, 589-90
   PreFilterProperties method, overriding, 596
   rendering, 575-80
   scrollable views using, 554
   shadowing, 596
   styles in, 571-74
   template properties, 568-71
   TitlesDB.xml, 557
   UIs using, 554
   verbs, template editing, 602
DataBoundTable control example, 424-32
DataBoundTableDesigner example, 442-50
DataGrid controls
   custom controls recommended for, 113
   Web services stock example, 513-14
DataList controls
   custom controls recommended for, 113
   event bubbling from Buttons, 311
   property specification, 320-21
   template editing verbs of, 392
DataSets
   IListSource with, 443
   ListView control, data source for, 557
   supporting, 433
DataSource property
   DataBoundTable control implementation, 426, 443-44
   DataSets with, 433
   design-time, 449-50
   exposing, stop in control creation, 423
   IEnumerable type, 433
   ListView control example, 557-58, 565
   persisting, 448
DatePicker control example
   browser versioning, 619
   browsing, 627
   Category attribute, 626
   compiling, 608
   composite control implementation, 608-10
   Controls property, overriding, 610
   CreateChildControls method, 610
   DatePicker.cs sample files, 608
   DatePickerTest.aspx, 605-6
   date-selection UI, 607
   DefaultEvent attribute, 626
   DefaultProperty attribute, 626
   DefaultValue attribute, 627
   delayed delegation, 612
   delegated properties, 610-12
   Description attribute, 626
   Designer attribute, 626
   designer for, 627-29
   design-time attributes, 625-27
   events, 622-23, 626
   file associations, clients, 619-20
   HTML rendered, sample of, 606-7
   Image control, 607
   immediate delegation, 612
   INamingContainer, implementing, 610
   metadata, 625-27
   object model, 607
   OnPreRender, overriding, 619
   persistence, 626
   postbacks, 623
   purpose of, 604
   ReadOnly property, 612
   RegularExpressionValidator controls, 607, 610-12, 624-25
   rendering, 620-22
   scripts, 615-20
   specification, 607
   styles with, 612-15
   testing page, 605-6
   TextBox controls, 607, 610, 623
   top-level tags, 621
   validation, 624-25
   view state, 612-15
DbgClr debugger, 107
debugging
   control builders, 337
   custom controls, 106-7
   design-time code, 418
   generated code, viewing, 26
declarative persistence
   of complex properties, 218-22
   inner default property persistence, 256
   MapDemo example, 225-45
   of simple properties, 125-27
   type converter classes for, 222-25
Default.disco example, 498-99
DefaultEventAttribute, 626, 635
DefaultPropertyAttribute, 626, 635
DefaultValueAttribute, 131, 627, 636
delayed delegation, 612
delegated properties, 610-12
delegates
   base class for all, 40
   binding, 40-42
   constructors, 41
   declaring, 39-40
   defined, 39
   event delegates, 42-44, 46
   event optimization, 192
   EventHandler, 42-44
   MulticastDelegate, 40
   naming guidelines, 43
   operation of, 40-41
   parameters, 41-42
deployment
   client files, 343-45
   custom controls, 90-92, 110
   licensing with xcopy, 466-67
   private assemblies for, 483
   server controls, 90-92
   shared assemblies for, 483-84
   user controls, 73, 110
   Web services, 497-99
DES (Data Encryption Standard), 475-76
DescriptionAttribute, 131, 138, 626, 635
designable components
   advantages of, 53-55
   all server controls are, 376
   base classes for, 54-55
   defined, 54
   design-time functionality, 376
   functionality. See design-time functionality
   IComponent interface for, 88-89, 376
DesignerAttribute, 399-401, 626, 639
designers
   assembly qualified type names, 400
   associating types with editors, 407-8
   associating with controls, 386, 399-401, 409, 590
   binding data, 393, 590-96
   built-in, 400
   changes, catching, 384
   child controls, adding to container controls, 394
   child controls using, 384-86
   collection editors, 258-59, 406-8
   component editors, 408-17
   ComponentDesigner class, 381-82
   ComponentEditor class, 409
   composite controls using, 384-86
   ContactInfoDesigner example, 386-93
   ControlDesigner class, 382-84
   CreateTemplateEditingFrame method, 388, 392
   customizing, 382-83
   data binding with, 424
   data-bound control designers, 442-50
   DatePicker control example, 627-29
   defined, 377, 381
   DesignerAttribute, 399-401, 626, 639
   design-time functionality from, 377, 379
   Dispose method for, 393
   early-bound syntax, 399-400
   EditorAttribute, 407-9
   GAC, located in, 400
GetCachedTemplateEditingVerbs method, 387-88, 392
   GetDesignTimeHtml, 382-84, 393, 394, 628
   GetEmptyDesignTimeHtml, 382, 393
   GetErrorDesignTimeHtml, 383
   GetTemplateContent method, 388, 393
   HTTP handlers using, 545-47
   IDesigner, 381, 399
   Initialize method, 383
   IServiceProvider, 411
   late-bound syntax, 400, 408
   limitations of read-write control designers, 394
   ListView control example, 558, 587-96
   location of, 399-400
   metadata attribute examples, 589-90
   methods requiring overriding, 382-83
   modal dialog boxes for, 402, 404-5
   MyLabelComponentEditor example, 408-15
   MyLabelDesigner.cs, 416-17
   namespaces with, 399
   properties, editing, 386-93
   ReadWriteControlDesigner, 384, 385, 394-98, 400
   rendering engines for, 382
   resizing, enabling, 393
   ScrollablePanelDesigner example, 394-98
   SetTemplateContent method, 388, 393
   shadowing, 442-43, 449, 596
   Site property, 411
   StringEditor example, 401-6
   TemplatedControlDesigner class, 384, 387-93
   types, associating with editors, 407-8
   UI type editors, 401-6
   verbs, 387-88, 392, 399, 415-17
   visibility of controls, 384
   Web services with, 515-18
DesignerSerializationVisibilityAttribute, 637
design-time attributes, 130-31
design-time code debugging, 418
design-time functionality
   advantages of implementing, 376
   architecture of .NET for, 376-80
   classes outside control used for, 376-77
   Component class for, 376
   component editors, 378-79
   defined, 375
   designable components, 376
   designers. See designers
   IComponent interface for, 376
   multiple views, 515
   type converters, 377, 379-81, 596
   UI type editors, 377, 379
   Web Matrix with, 657-59
development environments
   ASP.NET Web Matrix. See Web Matrix
   Visual Studio .NET. See Visual Studio .NET
DHTML (Dynamic HTML)
   client scripts with, 342-43
   HtmlEditor example, 345-58
   server controls. See DHTML-based server controls
DHTML-based server controls
   advantages of, 603
   client-side behavior, 615-20
   composite control implementation, 608-10
   CreateChildControls method, 610
   delegated properties, 610-12
   designer for, 627-29
   design-time attributes, 625-27
   DHTML capabilities of browsers, 603
   events, 622-23
   INamingContainer, implementing, 610
   rendering, 620-22
   styles with, 612-15
   test page example, 605-6
   top-level tags, 621
   view state, 612-15
dictionary, view state, 118-19
directories
   MapPath method, 527-28
   private bins, 483
   user control paths, 62-63, 66, 73
   virtual roots, 91, 103
disco files, 497-99
Dispose phase of life cycle, 175, 179
documentation comments, 650-51
DOM (Document Object Model) browsers, 340, 352
downlevel rendering, 167-70
dynamic images using HTTP handlers, 532-38
dynamic properties, 477

E
ECMAScript browsers, determining version of, 340, 352
editing HTML. See HtmlEditor example
EditorAttribute, 407-8, 639
EditorBrowsableAttribute, 636
editors, collection, 406-8
editors, component
   associating with controls, 409
   ComponentEditor class, 409
   defined, 378, 408
   EditorAttribute, 407-9, 639
   Form defining UI, 412
   interfaces for, 411
   launching, 415-17
   MyLabelComponentEditor example, 408-15
   MyLabelDesigner.cs, 416-17
   Property Builder command, 415
   relationships to design-time functionality, 379
   verbs for, 415-17
editors, UI type, 401-6
ellipsis buttons, 402, 405
e-mail, 7
Enabled property, 129
EnableViewState property, 127
EncLicGen.exe tool, 477
EncryptedLicenseProvider example, 475-77
enumeration
   of data source objects, 558, 566
   of data-bound control data, 433
   HtmlTextWriter class, of, 146-49
   properties, 126-27, 138
error messages, ValidationSummary controls, 364-65
event handling
   AddHandler method, 46
   DatePicker control example, 622-23
   declarative syntax for, 184-85
   defined, 42
   designer attribute for, 589
   EventHandlerLists using, 192-94
   HitTracker example, 215-16
   JavaScript, 151-52
   Laptop.cs example, 50-51
   postbacks, 206-12
   RemoveHandler method, 46
   unwiring, 43-44
   user control model, 75
   wiring, 43-44
event wiring, 43-44
event-driven programming model, 184
events
   attributes, applying to, 53
   battery sample, 46-51
   bubbling, 296, 304, 311-13, 580-85
   callbacks, 39
   Click events, 187-91
   client-side, mapping to server events, 185-91
   Command event, 584
   Control class, inheriting from, 183
   data classes, 44
   DatePicker control example, 622-23, 626
   default, attaching to controls, 184
   defined, 39
   delegates for, 39, 42-44, 46
   derived classes, virtual method for, 45
   event keyword, 44-45
   EventArgs, 42-44, 47-48
   EventHandler, 42-44
   EventHandlerLists, 192-94
   exposing, 212-16
   grouping with designers, 590
   handler methods. See event handling
   HitTracker example, 212-16
   implementation, 44-46
   life cycle, 183
   ListView control example, 580-85
   locks, overhead from, 192
   members, defining, 44-45
   members generated automatically, 45-46
   On methods, 184
   multiple per class, 191-94
   naming data classes, 43
   naming delegates, 43
   optimizing implementation, 191-94
   postback data, 185-86, 203, 210
   postback, mapping to server events, 186-91
   postback, raising on, 204-7, 210
   postback, signaling occurrence of, 185
   property constructs, 192, 193
   publish-subscribe model, 39
   raising, 44-46, 212-16
   raising on postback, 204-7, 210
   receivers, 39
   senders, 39
   signatures of delegates, 42
   SimpleButton example, 187-91
   sinks, 39
   sources, 39
   unwiring, 43-44
   wiring, 43-44
exceptions, properties generating, 35-36
expando attributes, 271-73, 621
ExpiringLicenseProvider example, 473-75
explicit interface method implementation, 190
extensibility of ASP.NET, 10-11

F
fields compared to properties, 36-37
file dependencies, page programming model, 25
FontInfo class object model listing, 646
fonts
   Font property, 218-19
   HTML 3.2-specific tagging, 167
footers, 65-66
formatting. See also styles
   base class for rendering, 143
   HTML 3.2-specific tagging, 167
   LoginUI example, 155-67
   properties, setting, 104
   WebControl class properties, 96-97, 129-30
fragment caching, 81, 113
frames, template editing, 392
FTP, Web Matrix workspace with, 655
full names, 483-84
function pointers, 39

G
GAC (Global Assembly Cache)
   client-side files, location of, 344
   designers located in, 400
   installing assemblies in, 484
   shared assembly deployment, 483-84
garbage collection, 4
GDI+ class library
   defined, 6
   JPEG image generation, 532-38
generated code, viewing, 26
get accessors, 32, 35
get keyword, 32, 35
GetCachedTemplateEditingVerbs method, 387-88, 392
GetDesignTimeHtml, 382-84, 393, 394, 628
GetEmptyDesignTimeHtml, 382, 393
GetErrorDesignTimeHtml, 383
GetTemplateContent method, 388, 393
getters, 32, 35, 482
Global Assembly Cache. See GAC (Global Assembly Cache)
GreetingLabelTest example, 454-55

H
handlers, HTTP
   AddXmlMapping.vbs example, 529-30
   .ashx files, 520, 524, 533
   .aspx files, 520-21
   assemblies, compiling into, 533
   binary data generation, 532
   cached content, 528
   content type, setting, 524, 527
   controls for query string logic, 538-45
   defined, 10, 519
   designers with, 545-47
   dynamic images using, 532-38
   extensibility of, 11
   extensions, handling, 525-28
   factories, 520
   file type associations, 520
   HelloWorldHandler example, 522-24
   HTML markup, generating, 522-24
   HttpForbiddenHandlerFactory, 520
   IHttpHandler interface, 10, 521-24
   IHttpHandlerFactory interface, 522
   IIS metabase with, 528
   ImageLabel control example, 538-45
   ImageLabelDesigner example, 545-47
   ImageLabelHandler example, 532-38
   ImageLabelTest.aspx, 547-48
   IReusable property, 522
   mapping to config files, 528
   operation of, 519-20
   overview, 519-21
   PageHandlerFactory, 520, 522
   parameter support, 538
   path retrieval, 527
   precompiling to assemblies, 525
   ProcessRequest method, 522, 538
query strings parameters passed, 524, 532, 538-45
   referencing in assemblies, 533
   registering, 520
   request processing, 520
   session state with, 548-49
   setup scripts, 529-30
   SimpleHandlerFactory, 520
   StaticFileHandler, 520
   UI namespace, 520
   URL query strings, 524, 532, 538-45
   WebServiceHandlerFactory, 520
   XmlHandler example, 525-28
   XSL transforms, running, 525-28
handling events
   AddHandler method, 46
   DatePicker control example, 622-23
   declarative syntax for, 184-85
   defined, 42
   designer attribute for, 589
   EventHandlerLists using, 192-94
   HitTracker example, 215-16
   JavaScript, 151-52
   Laptop.cs example, 50-51
   postbacks, 206-12
   RemoveHandler method, 46
   unwiring, 43-44
   user control model, 75
   wiring, 43-44
headers, 64-66
HelloWorldHandler example, 522-24
hidden variables, 123
hierarchy, control
   data-bound controls, creating, 434-36
   event bubbling, 311-13
   view state of child controls, 310-11
HitTracker example, 212-16
hot spots, creating, 236, 247-55
HotSpotCollection class, 265-69
HoverLabel example, 151-55
.htc files, 343
HTML 3.2, rendering, 148, 167-70
Html32TextWriter class, 167-70
HtmlControls
   ASP.NET architecture, relation to, 18
   deriving from, 99
HtmlEditor example, 345-58
HtmlTextWriter class
   advantages of, 156
   base class for, 148
   browsers, targeting specific, 167-70
   encapsulation of response stream by, 144
   enumerations of, 146-49
   HTML 3.2, 148, 167-70
   LoginUI example, 155-67
   methods, using, 165
   multiple calls to, 147
   rendering methods with, 143
   styling tags with, 165
   tags, building before rendering, 165
   Write method, 90, 147
HTTP handlers
   AddXmlMapping.vbs example, 529-30
   .ashx files, 520, 524, 533
   .aspx files, 520-21
   assemblies, compiling into, 533
   binary data generation, 532
   cached content, 528
   content type, setting, 524, 527
   controls for query string logic, 538-45
   defined, 10, 519
   designers with, 545-47
   dynamic images using, 532-38
   extensibility of, 11
   extensions, handling, 525-28
   factories, 520
   file type associations, 520
   HelloWorldHandler example, 522-24
   HTML markup, generating, 522-24
   HttpForbiddenHandlerFactory, 520
   IHttpHandler interface, 10, 521-24
   IHttpHandlerFactory interface, 522
   IIS metabase with, 528
   ImageLabel control example, 538-45
   ImageLabelDesigner example, 545-47
   ImageLabelHandler example, 532-38
   ImageLabelTest.aspx, 547-48
   IReusable property, 522
   mapping to config files, 528
   operation of, 519-20
   overview, 519-21
   PageHandlerFactory, 520, 522
   parameter support, 538
   path retrieval, 527
   precompiling to assemblies, 525
   ProcessRequest method, 522, 538
query strings parameters passed, 524, 532, 538-45
   referencing in assemblies, 533
   registering, 520
   request processing, 520
   session state with, 548-49
   setup scripts, 529-30
   SimpleHandlerFactory, 520
   StaticFileHandler, 520
   UI namespace, 520
   URL query strings, 524, 532, 538-45
   WebServiceHandlerFactory, 520
   XmlHandler example, 525-28
   XSL transforms, running, 525-28
HTTP modules, 10
HTTP POST requests, 185
HTTP response stream, writing to. See rendering
HTTP runtime
   handlers. See HTTP handlers
   HTTP modules, 10
   page execution model, place in, 23
   purpose of, 8
   request processing, 8-10
   System.Web namespace, 7
HttpApplicationState object, 125
HttpContext objects, 8
HttpRequest objects
   Browser property, 340
   HTTP runtime use of, 8
   MapPath method, 527-28
HttpResponse objects, 8
HttpSessionState object, 125
hyperlinks, postbacks from, 194-99

I
IAttributeAccessor, 271-73
IBuySpy Web site, 81
IComponent interface
   designability from, 88-89
   purpose of, 54
icons for custom controls, 105-6
id attributes, 165
ID property, 127
IDataSourceProvider, 444, 449-50
IDesigner, 381, 399
IEnumerable, 433
IHttpHandler interface, 10, 521-24
IHttpHandlerFactory interface, 522
IHttpModule interface, 10
IIS (Internet Information Services)
   client-side files, location of, 344
   HTTP handlers, metabase mapping, 528
   HTTP runtime request processing, 8-10
   virtual roots, 91, 103
IList, view state with, 264-65
Image control, 607
ImageLabel control example, 538-45
ImageLabelDesigner example, 545-47
ImageLabelHandler example, 532-38
ImageLabelTest.aspx, 547-48
ImageMap example, 255-64
immediate delegation, 612
INamingContainer
   base class implementing, 305
   composite controls naming scope, 294-95
   DHTML-based control implementation, 610
   templated controls using, 327-29
   UniqueID assignment, 303, 307-8
Initialize phase, 175-76
inline code, 22
inner default property persistence, 221-22, 256, 264
inner property persistence, 220-22
InnerTextLabel example, 333-36
Instantiate phase, 175-76
interfaces
   explicit interface method implementation, 190
   lookless, 17
   standard interface implementation, 190
   user. See UIs (user interfaces)
Internet Explorer, Microsoft
   DHTML capabilities, 603
   HTML editing feature, 345
   Web controls library, 21
interoperability
   code model for, 23
   feature of .NET Framework, 5
   user control programming languages, 60
IPostBackDataHandler
   composite controls, 294
   data handling, 203-7
   object model listing, 647
   postback architecture, place in, 185-86
IPostBackEventHandler
   architecture of postbacks, 185-91
   implementing, 244
   object model listing, 647
ISAPI filters, 521
IServiceProvider, 411
ISite, 411
IStateManager
   implementation example, 264
   implementing in custom types, 249-54
   object model listing, 647
   purpose of, 246-47
   Style type implementing, 279
ITemplate type, 320-21, 326-27
Items collection, collection editors for, 406-7
IValidator, 360-61, 371-72


Next



Last Updated: August 27, 2002
Top of Page