Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 16 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
16
Dung lượng
273,09 KB
Nội dung
Web Parts and Portal P R E S E N T E R : M R . D O A N Q U A N G M I N H Agenda Introduction ASP.NET 2.0 Portal Framework Web Parts Control Connecting Web Parts Connecting Web Parts Demo Introduction Portal Is a website that provides a starting point or gateway to other resources on the Internet or an intranet Web Parts: An extension of custom controls with the flexibility and user An extension of custom controls with the flexibility and user controls Provide the foundation for both customization and personalization Connections between components Personalization Ability to customize the information that provide by portal ASP.NET 2.0 Portal Framework Web Parts Are controls that display to end-user. Allow to personalize. Connections Allow to communicate between each separate web part to Allow to communicate between each separate web part to share information Web Part Manager Monitoring the perform of all web parts ASP.NET 2.0 Portal Framework Editing The area that contains the editor controls. These controls include AppearanceEditor, LayoutEditor, BehaviorEditor, and PropertyGridEditor Catalog Catalog The place that show to end-user list web parts available which they can add to their page. The WebPartManager Control Regulates operation of Web Parts Maintains list of Web Parts and zones Manages page state (for example, display mode) and fires events when page state changes Facilitates communication between Web Parts Facilitates communication between Web Parts Manages personalization One and only one instance per page. No UI <asp:WebPartManager ID="WebPartManager1“ runat="server" /> The WebPartZone Control Defines zones on a Web Parts page Defines default layout and appearance of Web Parts within each zone <asp:WebPartZone ID="WeatherZone" DragHighlightColor="244,198,96" RunAt="server"> <PartTitleStyle BackColor="#2254B1" ForeColor="White" /> <PartStyle BorderColor="#81AAF2" BorderStyle="Solid" BorderWidth="1px" /> <ZoneTemplate> <! Web Parts declared here > </ZoneTemplate> </asp:WebPartZone> Web Parts Controls defined in a WebPartZone Web controls, user controls, custom controls Controls that don't implement IWebPart are internally wrapped in GenericWebParts Adds properties: Title, Description, etc. Adds properties: Title, Description, etc. <ZoneTemplate> <asp:Calendar Title="Calendar" ID="Calendar1" RunAt="server" /> <user:Weather Title="Weather" ID="Weather1" RunAt="server" /> <custom:Search Title="Search" ID="Search1" RunAt="server" /> </ZoneTemplate> Display Mode 5 display mode of web part BrowseDisplayMode: Standard view mode. No personalization or editing. DesignDisplayMode: Enables drag-and-drop layout personalization or customization personalization or customization EditDisplayMode: Enables personalization or customization of Web Part properties to change appearance and behavior. Allows user to delete dynamically added Web Parts. ConnectDisplayMode: Enables user to connect Web Parts at run time CatalogDisplayMode: Enables users to add Web Parts at run time Customization Controls Edit Parts (EditDisplayMode): PropertyGridEditorPart AppearanceEditorPart BehaviorEditorPart LayoutEditorPart LayoutEditorPart Catalog Parts (CatalogDisplayMode): PageCatalogPart – lists of closed Web Parts DeclarativeCatalogPart – lists Web Parts that can be added [...]...Connecting Web Parts Web Parts can communicate Provider publishes interface Consumer uses interface to retrieve data WebPartManager manages connections Retrieves interfaces from providers Provides interfaces to consumers Connections can be static or dynamic ConnectionsZone provides UI for latter Connecting Web Parts Connection Providers Implements Method that... (); // Get zip from provider } Web Part Connections 1 WebPartManager calls WebPartManager [ConnectionProvider] method 2 WebPartManager receives provider interface in return 3 WebPartManager calls [ConnectionConsumer] method, passing interface to consumer Provider 4 Consumer 4 Consumer calls provider using supplied interface Reference www.asp.net www.msdn.com ASP.NET 2.0 Web Parts in Action Some others . Web Parts and Portal P R E S E N T E R : M R . D O A N Q U A N G M I N H Agenda Introduction ASP.NET 2.0 Portal Framework Web Parts Control Connecting Web Parts Connecting Web Parts . /> <ZoneTemplate> <! Web Parts declared here > </ZoneTemplate> </asp:WebPartZone> Web Parts Controls defined in a WebPartZone Web controls, user controls, custom. (CatalogDisplayMode): PageCatalogPart – lists of closed Web Parts DeclarativeCatalogPart – lists Web Parts that can be added Connecting Web Parts Web Parts can communicate Provider publishes interface