Your SlideShare is downloading. ×

Creating Web Parts New

873
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
873
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Hi Wpf team Questions strat V1 Wfc No idea
  • Transcript

    • 1. Creating Web Parts
    • 2. Agenda
      • Web Part (Base class)
        • An ASP.NET web control
        • Browser Rendering
        • Rendering in non-browser clients
        • Overriding events
      • Web Part Properties
        • Introduction
        • Property attributes
        • Saving properties
    • 3. Agenda (Contd.)
      • Creating a simple ‘Hello World’ Web Part, with a custom property
        • Demo
      • Tool parts
        • Introduction
        • Methods
        • Demo
    • 4. Agenda (Contd.)
      • Part to part connections
        • Introduction
        • Interfaces
      • Extending the framework
        • Builders
        • Web Part menus
        • Tool pane
      • Web Part Caching
        • Introduction
    • 5. Web Part (Base class)
      • Web Parts are ASP.NET Web Controls
        • WebPart (base class) derives from System.Web.UI.Control
        • Like all controls they participate in:
          • Page rendering
          • Property settings
          • Post-back events
          • State management
      Web Part = ASP.NET Web Control
    • 6. Web Part (Base class) (Contd.)
      • Browser Rendering
        • The base class Render() method can’t be overridden. The base class uses this to render the chrome, title and web part menu
        • Custom Web Parts need to implement the RenderWebPart() method to render custom Html
    • 7. Web Part (Base class) (Contd.)
      • Browser Rendering (Contd.)
      ASPX Page Web Part WebPart.Render() CustomPart.RenderWebPart() ASP.NET starts page render Request
    • 8. The Web Part base class (Contd.)
      • Rendering in non-browser clients
        • IDesignTimeHtmlProvider interface is used to obtain the rendering for the web part when added to page in clients like FrontPage
        • IDesignTimeHtmlProvider consists of one method: GetDesignTimeHtml
        • Not implemented by default
    • 9. The Web Part base class (Contd.)
      • Overriding Events
        • The following ASP.Net events are sealed:
          • OnInit , OnDataBinding , OnLoad, OnPreRender, OnUnload
          • To subscribe to these events the developer will use:
          • this.Load += new EventHandler (myLoadEvent);
    • 10. Web Part Properties
      • Introduction
        • Web Parts have ‘properties’ that help the user define their behavior
        • Two kinds of properties:
          • Base class properties
          • Custom properties
        • All properties must be serializable through the XMLSerializer
        • Property attributes define property behavior
    • 11. Web Part Properties (Contd.)
      • Property attributes
        • Browsable (.Net)
        • Category (.Net)
        • Description (.Net)
        • - Etc. -
        • FriendlyName (Web Part Framework)
        • HtmlDesigner (Web Part Framework)
        • WebPartStorage (Web Part Framework)
        • - Etc. -
    • 12. Web Part Properties (Contd.)
      • Saving Properties
        • Properties are serialized and stored in the database
        • Stored in two contexts:
          • Shared
          • Personal
        • Storage is controlled by the WebPartStorage attribute:
          • WebPartStorage = Storage.Shared
          • WebPartStorage = Storage.Personal
          • WebPartStorage = Storage.None
    • 13. Creating a simple ‘Hello World’ Web Part, with a custom property
    • 14. Tool parts
      • An Introduction
        • Also derive from Web Controls and should be used to add custom functionality to the tool pane
        • Differ from web parts
          • No mobility
          • Limited base class property set
          • No property storage
          • Render only in the tool pane
        • Rendering process similar to web parts
          • ToolPart.Render cannot be overridden
          • Implement RenderToolPart
    • 15. Tool parts (Contd.)
      • Important Methods
        • ToolPart.ApplyChanges()
          • Called when the user clicks Apply/ Ok on the property sheet
        • ToolPart.CancelChanges()
          • Called when the user clicks Cancel on the property sheet
        • ToolPart.SyncChanges()
          • Called when the tool part needs to refresh itself. (example: after another tool part has saved properties)
        • WebPart.GetToolParts
          • Method on the web part base class
          • Used to associate tool parts with web parts
    • 16. Creating a custom tool part
    • 17. Part to part connections
      • An Introduction
        • Allows Web Parts to send & received basic types of data; e.g. Cell, Row, List, etc.
        • Uses standardized set of interfaces
        • Allows completely independent parts to connect
        • Enables end users to form connections
          • Browser
          • FrontPage
    • 18. Part to part connections (Contd.) My Web Part Page
    • 19. Part to part connections (Contd.)
      • Interfaces
        • ICellProvider, ICellConsumer
        • IRowProvider, IRowConsumer
        • IListProvider, IListConsumer
        • IFilterProvider, IFilterConsumer
        • IParametersOutProvider, IParametersOutConsumer
        • IParametersInProvider, IParametersInConsumer