3
Control Framework Overview Rich framework to enable building “smart” server controls Preserves existing knowledge and compatibility Same model as v1, but enables much more Simplifies development with more functional base classes targeting common scenarios Incorporates learning and general recommended patterns Provides new services and framework features

5
Composite Controls Powerful way to create new controls by combining the functionality of one or more existing controls CompositeControl base class simplifies development New base class introduced in Microsoft ASP.NET 2.0 Incorporates recommended pattern Implements INamingContainer Overrides Controls property Overrides DataBind() Associated designer ensures child controls are created at design-time as well

8
Define which control receives focus: Page Level Control Controls can override to delegate focus to a child control if they want explicit control Focus Control.Focus(..) public void Page.SetFocus(..); public bool BaseValidator.SetFocusonError;

12
Script Callbacks Improves UI experience Page is interactive while the server processes request No browser flashing or loss of scroll position Does not add to the navigation history Control developer writes some additional code Modeled after post-back event handling Also implements a script callback function Page framework handles partial page execution

16
Control State The essential bits of information to allow controls to ensure expected behavior E.g., SelectedIndex, EditIndex, PageIndex on GridView; ReadOnly property on HtmlEditor Separated out of view state Page developer can turn off view state without losing functionality Control state cannot be turned off Controls must opt-in to participate in this mechanism Should store only the essentials, so control state doesn’t become another view state Properties stored in control state should not be saved in view state as well

17
Asynchronous Task Allow a container to register an asynchronous task to the page Container will be notified when task completed, time-out or ended Time Out is defined at the page directive Control developers can alter the rendering based on the async task result

20
Web Parts: Connection Interface Defines the communication contract between two Web parts Connection types Provider Control that provides data and schema information Implements a provider connection point [ConnectionProvider] Defines a call back that returns an instance of the interface One provider connection point can connect to any number of consumer connection points of the same type Consumer Control that gets data Implements a consumer connection point [ConnectionConsumer] Defines a call back that gets an instance of the interface One consumer connection point can connect to only one provider connection points of the same type

26
Web Parts: Personalization Personalization scope SharedPer-user Personalizing data Automatic Add [WebPersonalization] decoration to properties Must have a public get and set accessor, and take no index parameters Manual Implement IPersonsonalizable Provide fine-grained control over how control personalization data is get/set

27
Web Parts: Personalization (cont’d) Receives notification about the orphaned properties Manager property persistence when upgrades to existing controls Implement IVersioningPersonsonalizable If a Web part does not implement IVersioningPersonalizable, orphaned property values will be deleted

29
TitleTitle VerbsVerbs ChromeChrome ContentContent TitleIconTitleIcon Web Parts: Chrome Developer can create a new Web part rendering Create a chrome class Associate the chrome class to the WebPartZone All Web Parts contained in a WebPartZone will use the same chrome

31
Summary Building control and advance features could not be easier Take Advantage of the new powerful framework features Building control and advance features could not be easier Take Advantage of the new powerful framework features

32
Get a 48% Discount on MSDN Universal Now! For a limited time purchase a 12 month MSDN Universal Subscription for $3565+GST (RRP). You will receive updates as they are released for SQL Server, BizTalk Server, Visual Studio, Exchange Server and Windows Server. You will also receive early access to beta products such as Windows Vista and Office 12. Get in now so that when Visual Studio Team System ships you will be upgraded at no cost to one of the new top tier subscriptions: Visual Studio 2005 Team Edition for Software Developers Visual Studio 2005 Team Edition for Software Architects Visual Studio 2005 Team Edition for Software Testers For more details and to find your local reseller visit: www.microsoft.co.nz/buyMSDN www.microsoft.co.nz/buyMSDN

34
We invite you to participate in our online evaluation on CommNet, accessible Friday only If you choose to complete the evaluation online, there is no need to complete the paper evaluation Your Feedback is Important!

About project

Feedback

To ensure the functioning of the site, we use cookies. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy &amp Terms.
Your consent to our cookies if you continue to use this website.