150 likes | 439 Views
Developing An Advanced ASP.NET Server Control With Rich Design-Time. Eilon Lipton PRS401 Software Design Engineer Microsoft Corporation. Developing ASP.NET 2.0 Server Controls Agenda. Scenario Real estate company web site requires rich controls to enable a variety of custom scenarios Solution
E N D
Developing An Advanced ASP.NET Server Control With Rich Design-Time Eilon LiptonPRS401Software Design EngineerMicrosoft Corporation
Developing ASP.NET 2.0 Server ControlsAgenda • Scenario • Real estate company web site requires rich controls to enable a variety of custom scenarios • Solution • PhotoViewer: Allows a user to navigate through a collection of photos for a given listing • MultiList: Allows a user to view real estate listings in a geographical region • We will cover • Runtime: Composition, state management, callbacks,web resources, script handling, and data bound controls • Design-time: Region-editing, task-based editing, painting, host services
Web Server RaiseCallbackEvent GetCallbackResult Client PhotoviewerRuntime: Callbacks And Web Resources • Scenario • Child control will handle rendering • Manage state in parent control • Eliminate page flicker, update only relevant markup • Deploy control as single assembly • Solution • StateManagedCollection simplifies state management for collection items • Callbacks transfer data between client and server using XMLHTTPand JavaScript • Embedded WebResources used to ease deployment and versioning
Photoviewer Runtime Eilon LiptonSoftware Designer EngineerWeb Platform and Tools
Photoviewer Controldesigner: Regions And Smart Tags • Scenario • Enhanced design-time interactivity • Promote important editing operations • Solution • CompositeControlDesigner handles interaction with runtime control • Web resources are handled by the designer host • DesignerRegions describe clickable, selectable,and editable areas • Mouse click responds to user input • Smart Tags expose important and complex tasks
Photoviewer Design-Time Eilon LiptonSoftware Designer EngineerWeb Platform and Tools
MultiListRuntime • Scenario • Data and templates define composition • Control must function when ViewState is disabled • Solution • Extend CompositeDataBoundControl to handle creation of child controls based on data • Use templates to allow user to customize rendering • Store critical state in ControlState rather than ViewState
MultiList Runtime Eilon LiptonSoftware Designer EngineerWeb Platform and Tools
MultiListDesign-time • Scenario • WYSIWYG template editing • Use standard interfaces for wiring up to a data source • Solution • Extend DataBoundControlDesigner to offer data source picker and expose schema • DesignerRegions provide custom inline editing of template content • Paint graphics to go beyond HTML
MultiList Design-Time Eilon LiptonSoftware Designer EngineerWeb Platform and Tools
Summary • Runtime • Composite controls and templates for scenario controls • DataBoundControl class for data-driven content • WebResources for embedded content • ControlState for critical state • Design-time • DesignerActionLists for contextual tasks • DesignerRegions for contextual editing • Clicking and painting for interactive page design • Auto format for common control styles
Your Control Here! Call To Action • ASP.net 2.0 adds many new features for the control developer Control WebControl DataBoundControl CompositeControl CompositeDataBoundControl MultiList MultiListViewSwitcher PhotoViewer
Community Resources • At PDC • For more information, go see • PRS312 – ASP.NET: Future Directions for Developing Rich Web Applications with Atlas (Part 1) • PRS420 – ASP.NET: Future Directions for Developing Rich Web Applications with Atlas (Part 2) • After PDC • If you missed this session, watch it on the DVD • PRS401: ASP.NET: Developing an Advanced ASP.NET Server Control with Rich Design-Time • ASP.NET Web Site – http://www.asp.net • ASP.NET Forums – http://forums.asp.net/142/ShowForum.aspx
Questions? elipton@microsoft.com
© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.