SlideShare a Scribd company logo
SharePoint 2010
 Session - 5

By: Usman Zafar Malik
[MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP
SharePoint 2010 Development
SharePoint 2010 Development
โ€ข Simple Web parts
โ€ข Advance Level Web parts
SharePoint 2010 Simple Web parts
Simple Web parts
What are web parts?
โ€ข Web Part is also called a Web Widget, is an
  ASP.NET server control which is added to a Web
  Part Zone on Web Part Pages by users at run
  time. It enable end users to modify the content,
  appearance, and behavior of Web pages directly
  from a browser.
Possible scopes
โ€ข Site Level.
Simple Web parts
Two types of web parts

โ€ข Pure ASP.Net based web parts
  Derived from:- System.Web.UI.WebControls.WebParts.WebPart
   โ€“ Generic web parts, that can be used in SharePoint and outside the
     SharePoint domain.

โ€ข SharePoint based web parts
  Derived from:- Microsoft.SharePoint.WebPartPages.WebPart
   โ€“ Only used in the SharePoint domain.
Simple Web parts
Further Categorization in Web parts

โ€ข Web parts
  - A class derived from โ€œWebpartsโ€ class

โ€ข Visual web parts
  - A class derived from โ€œWebpartsโ€ but also contains a
user control in this web part.
  - Canโ€™t be used in sandboxed solutions.
Simple Web parts
Simple Web parts
Simple Web parts
Simple Web parts
Simple Web parts
Define properties in web parts

The WebBrowseable attribute specifies that the decorated property should appear in the editor component
of the web part. It only allows the end user to modify the property and does nothing about persistence.

The Personalizable attribute specifies that the value of the decorated property must be persisted in the
SharePoint backend, either in the user store (by default) or in the shared store (if the Shared scope is
specified). It only cares about persistence and does nothing about the property presence in the editor
component.

So, if you decorate a property with [WebBrowsable] and not [Personalizable], the end user will be able to
modify it in the editor component but its new value won't be persisted.

Conversely, if you decorate a property with [Personalizable] and not [WebBrowsable], its value will be
persisted but the end user won't be allowed to modify it.
Simple Web parts Life Cycle
              OnInit
             OnLoad
        CreateChildControls
           OnPreRender
          SaveViewState
            Site Render
         RenderContents
            OnUnload
             Dispose
Visual Web parts
Visual Web parts
Visual Web parts
Visual Web parts
Visual Web parts Life Cycle            SimpleVisualWebPart - OnInit

                                      SimpleVisualWebPart - OnLoad

                                SimpleVisualWebPart - CreateChildControls

                                  SimpleVisualWebPartUserControl - OnInit

                                 SimpleVisualWebPartUserControl - OnLoad

                               SimpleVisualWebPartUserControl - Page_Load

                                    SimpleVisualWebPart - OnPreRender

                              SimpleVisualWebPartUserControl - OnPreRender

                                   SimpleVisualWebPart - SaveViewState

                              SimpleVisualWebPartUserControl - SaveViewState

                                       SimpleVisualWebPart - Render

                                 SimpleVisualWebPartUserControl - Render
Visual Web parts Life Cycle
                                SimpleVisualWebPart - RenderContents

                              SimpleVisualWebPartUserControl - OnUnload

                               SimpleVisualWebPartUserControl - Dispose

                                   SimpleVisualWebPart - OnUnload

                                    SimpleVisualWebPart - Dispose
SharePoint 2010 Advance Level Web parts
Advance Level Web parts
Advance Level web parts?
โ€ข Web part which contains toolpart, or we add
  some custom controls in Web part Editor Tool
  part section.
Advance Level Web parts
Advance Level web parts?
โ€ข Web part which contains Custom Webpart Editor Section

โ€ข Two ways to create Custom Editor Part / Toolpart of Web
  part
   โ€“ By inheriting class from
     โ€œMicrosoft.SharePoint.WebPartPages.ToolPartโ€

   โ€“ By Implementing Interface โ€œIWebEditableโ€ on Toolpart class
Advance Level Web parts
Using Toolpart class
Advance Level Web parts
Using Toolpart class
Advance Level Web parts using Toolpart class
Advance Level Web parts using Toolpart class


Three Level of ToolParts
  โ€“ WebPartToolPart
  โ€“ CustomPropertyToolPart
  โ€“ Add Custom ToolPart
Advance Level Web parts using Toolpart class
WebPartToolPart

Default WebPart properties:-

โ€ข   Appearance
      โ€“   Title
      โ€“   Width
      โ€“   Frame State
      โ€“   Frame Style
โ€ข   Layout
      โ€“   Visible on Page
      โ€“   Direction
      โ€“   Zone
      โ€“   Part Order
โ€ข   Advanced
      โ€“   Allow Minimize
      โ€“   Allow Close
      โ€“   Allow Zone Change
      โ€“   Allow Export Sensitive Properties
      โ€“   Detail Link
      โ€“   Description
      โ€“   Help Link
      โ€“   Icon File (Large)
      โ€“   Icon File (Small)
      โ€“   Missing Assembly Error
      โ€“   Target Audiences
Advance Level Web parts using Toolpart class

CustomPropertyToolPart

An additional ToolPart that is added when
custom properties are added to the WebPart
programmatically.

Example:- First Name, Last Name
Advance Level Web parts using Toolpart class

CustomToolPart

A toolpart which you have programmatically
created and want to add in web part editor part.

Example:- Derived Classes from
โ€œMicrosoft.SharePoint.WebPartPages.ToolPartโ€
wants to add in the Web partโ€™s Editor section.
Advance Level Web parts using Toolpart class

public override Microsoft.SharePoint.WebPartPages.ToolPart[] GetToolParts()
{
       PersonDetailsToolPart CustomToolPart_ = new PersonDetailsToolPart();
       CustomToolPart_.Title = "Company Details";

      Microsoft.SharePoint.WebPartPages.ToolPart[] toolParts = new
Microsoft.SharePoint.WebPartPages.ToolPart[3];
      toolParts[0] = new Microsoft.SharePoint.WebPartPages.WebPartToolPart();
      toolParts[1] = new Microsoft.SharePoint.WebPartPages.CustomPropertyToolPart();
      toolParts[2] = CustomToolPart_;

      return toolParts;
}

Override the โ€œGetToolParts()โ€ method in order to add the custom toolpart in to your web part editor
part section.
Advance Level Web parts using Toolpart class
Common Webpart Properties
this.AllowMinimize = true/false
this.AllowHide = true/false;
this.AllowClose = false;
this.ChromeType = PartChromeType.None; (if user
wants to remove the border of the web part )
Advance Level Web parts using IWebEditable Interface
Steps

-   The web part which has the Custom Editor Part must implement the โ€œIWebEditable โ€œinterface.

    #region IWebEditable Members

    EditorPartCollection IWebEditable.CreateEditorParts()
    {
      // Adding your custom web part editor part (Example:- CustomEditor)
      List<EditorPart> editors = new List<EditorPart>();
      editors.Add(new CustomEditor());
      return new EditorPartCollection(editors);
    }

    object IWebEditable.WebBrowsableObject
    {
      get { return this; } // what is being edited :- Returning the Web part itself.
    }
    #endregion
Advance Level Web parts using IWebEditable Interface

Steps
- The Custom Editor Webpart must be inherited from
  โ€œEditorPartโ€ class.
- It must overrides two methods.
  1- ApplyChanges
    Used for copy content from Editor Part to Web part.
  2- SyncChanges
   Used for Copy content from Web part to Editor Part.
Q&A
Thanks !

More Related Content

What's hot (20)

User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
Damien Antipa
ย 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM Sites
ICF CIRCUIT
ย 
CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1
ICF CIRCUIT
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
ย 
User interface customization for aem6 circuit
User interface customization for aem6 circuitUser interface customization for aem6 circuit
User interface customization for aem6 circuit
Damien Antipa
ย 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
Buu Nguyen
ย 
SharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and BootstrapSharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and Bootstrap
Roy Kim
ย 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
Sharon James
ย 
AEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & FeaturesAEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & Features
Abhinit Bhatnagar
ย 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Netcetera
ย 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforce
Rinku Saini
ย 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
Madhuri Kavade
ย 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Ajax Experience 2009
ย 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
Rob Windsor
ย 
Customize it! Make IBM Connections look your way
Customize it! Make IBM Connections look your way Customize it! Make IBM Connections look your way
Customize it! Make IBM Connections look your way
Klaus Bild
ย 
Visualforce report
Visualforce reportVisualforce report
Visualforce report
Rinku Saini
ย 
Rails engines
Rails enginesRails engines
Rails engines
Josh Schramm
ย 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadable
paulbastide
ย 
Social Connections VI โ€” IBM Connections Extensions and Themes Demystified
Social Connections VI โ€” IBM Connections Extensions and Themes DemystifiedSocial Connections VI โ€” IBM Connections Extensions and Themes Demystified
Social Connections VI โ€” IBM Connections Extensions and Themes Demystified
Claudio Procida
ย 
Sling Dynamic Include
Sling Dynamic IncludeSling Dynamic Include
Sling Dynamic Include
Tomasz Rฤ™kawek
ย 
User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
Damien Antipa
ย 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM Sites
ICF CIRCUIT
ย 
CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1CIRCUIT 2015 - UI Customization in AEM 6.1
CIRCUIT 2015 - UI Customization in AEM 6.1
ICF CIRCUIT
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
ย 
User interface customization for aem6 circuit
User interface customization for aem6 circuitUser interface customization for aem6 circuit
User interface customization for aem6 circuit
Damien Antipa
ย 
New Features of ASP.NET 4.0
New Features of ASP.NET 4.0New Features of ASP.NET 4.0
New Features of ASP.NET 4.0
Buu Nguyen
ย 
SharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and BootstrapSharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and Bootstrap
Roy Kim
ย 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
Sharon James
ย 
AEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & FeaturesAEM 6.0 - Author UI Customization & Features
AEM 6.0 - Author UI Customization & Features
Abhinit Bhatnagar
ย 
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQDynamic Components using Single-Page-Application Concepts in AEM/CQ
Dynamic Components using Single-Page-Application Concepts in AEM/CQ
Netcetera
ย 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforce
Rinku Saini
ย 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
Madhuri Kavade
ย 
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling PagecacheChanhao Jiang And David Wei Presentation Quickling Pagecache
Chanhao Jiang And David Wei Presentation Quickling Pagecache
Ajax Experience 2009
ย 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
Rob Windsor
ย 
Customize it! Make IBM Connections look your way
Customize it! Make IBM Connections look your way Customize it! Make IBM Connections look your way
Customize it! Make IBM Connections look your way
Klaus Bild
ย 
Visualforce report
Visualforce reportVisualforce report
Visualforce report
Rinku Saini
ย 
Rails engines
Rails enginesRails engines
Rails engines
Josh Schramm
ย 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadable
paulbastide
ย 
Social Connections VI โ€” IBM Connections Extensions and Themes Demystified
Social Connections VI โ€” IBM Connections Extensions and Themes DemystifiedSocial Connections VI โ€” IBM Connections Extensions and Themes Demystified
Social Connections VI โ€” IBM Connections Extensions and Themes Demystified
Claudio Procida
ย 
Sling Dynamic Include
Sling Dynamic IncludeSling Dynamic Include
Sling Dynamic Include
Tomasz Rฤ™kawek
ย 

Viewers also liked (7)

Upgrade webcast avoid the mess id
Upgrade webcast   avoid the mess idUpgrade webcast   avoid the mess id
Upgrade webcast avoid the mess id
Joshua Haebets
ย 
Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)
Sara Durning, MDes
ย 
SpaceTech4
SpaceTech4SpaceTech4
SpaceTech4
Tom Jenkins
ย 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
Usman Zafar Malik
ย 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4
Usman Zafar Malik
ย 
SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)
MJ Ferdous
ย 
SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1
Usman Zafar Malik
ย 
Upgrade webcast avoid the mess id
Upgrade webcast   avoid the mess idUpgrade webcast   avoid the mess id
Upgrade webcast avoid the mess id
Joshua Haebets
ย 
Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)
Sara Durning, MDes
ย 
SpaceTech4
SpaceTech4SpaceTech4
SpaceTech4
Tom Jenkins
ย 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
Usman Zafar Malik
ย 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4
Usman Zafar Malik
ย 
SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)
MJ Ferdous
ย 
SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1
Usman Zafar Malik
ย 

Similar to SharePoint 2010 Training Session 5 (20)

Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
ย 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
SPTechCon
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
SharePoint Web part programming
SharePoint Web part programmingSharePoint Web part programming
SharePoint Web part programming
Quang Nguyแป…n Bรก
ย 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Lucas Jellema
ย 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
Rob Windsor
ย 
Full Stack_Reac web Development and Application
Full Stack_Reac web Development and ApplicationFull Stack_Reac web Development and Application
Full Stack_Reac web Development and Application
Jeyarajs7
ย 
Visualforce
VisualforceVisualforce
Visualforce
Milind Gokhale
ย 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
Vivek Singh Chandel
ย 
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
AX2012 Technical Track -  Entreprise portal, Czesia LangoswkaAX2012 Technical Track -  Entreprise portal, Czesia Langoswka
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
dynamicscom
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
connectwebex
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
ย 
SharePoint 2010 Customization Poster
SharePoint 2010 Customization PosterSharePoint 2010 Customization Poster
SharePoint 2010 Customization Poster
brendonschwartz
ย 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
parallelminder
ย 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin
ย 
Solving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonaldSolving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonald
Wey Wey Web
ย 
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile AppsGet your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Ackee
ย 
WSS MOSS Portfolio
WSS MOSS PortfolioWSS MOSS Portfolio
WSS MOSS Portfolio
dontrellbluford
ย 
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Tutorial, Part 4: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
SPTechCon
ย 
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
Advanced SharePoint 2010 and 2013 Web Part Development by Rob Windsor - SPTec...
SPTechCon
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
LiquidHub
ย 
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
Lucas Jellema
ย 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
Rob Windsor
ย 
Full Stack_Reac web Development and Application
Full Stack_Reac web Development and ApplicationFull Stack_Reac web Development and Application
Full Stack_Reac web Development and Application
Jeyarajs7
ย 
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
AX2012 Technical Track -  Entreprise portal, Czesia LangoswkaAX2012 Technical Track -  Entreprise portal, Czesia Langoswka
AX2012 Technical Track - Entreprise portal, Czesia Langoswka
dynamicscom
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
connectwebex
ย 
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEMBuild single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM
AdobeMarketingCloud
ย 
SharePoint 2010 Customization Poster
SharePoint 2010 Customization PosterSharePoint 2010 Customization Poster
SharePoint 2010 Customization Poster
brendonschwartz
ย 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
parallelminder
ย 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
Barry Gervin
ย 
Solving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonaldSolving Common Web Component Problems - Simon MacDonald
Solving Common Web Component Problems - Simon MacDonald
Wey Wey Web
ย 
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile AppsGet your mobile app in production in 3 months: Native and Reactive Mobile Apps
Get your mobile app in production in 3 months: Native and Reactive Mobile Apps
Ackee
ย 
WSS MOSS Portfolio
WSS MOSS PortfolioWSS MOSS Portfolio
WSS MOSS Portfolio
dontrellbluford
ย 

More from Usman Zafar Malik (6)

SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3
Usman Zafar Malik
ย 
SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2
Usman Zafar Malik
ย 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
ย 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
ย 
Windows Workflow Foundation
Windows Workflow FoundationWindows Workflow Foundation
Windows Workflow Foundation
Usman Zafar Malik
ย 
Presentation Moss 2007 Usman
Presentation Moss 2007 UsmanPresentation Moss 2007 Usman
Presentation Moss 2007 Usman
Usman Zafar Malik
ย 
SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3
Usman Zafar Malik
ย 
SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2
Usman Zafar Malik
ย 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
ย 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
ย 
Windows Workflow Foundation
Windows Workflow FoundationWindows Workflow Foundation
Windows Workflow Foundation
Usman Zafar Malik
ย 
Presentation Moss 2007 Usman
Presentation Moss 2007 UsmanPresentation Moss 2007 Usman
Presentation Moss 2007 Usman
Usman Zafar Malik
ย 

Recently uploaded (20)

Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
ย 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
ย 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
ย 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
ย 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
ย 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
ย 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
ย 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
ย 
Quantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur MorganQuantum Computing Quick Research Guide by Arthur Morgan
Quantum Computing Quick Research Guide by Arthur Morgan
Arthur Morgan
ย 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
ย 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
ย 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
ย 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
ย 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
ย 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
ย 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
ย 
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything โ€“ Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
ย 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
ย 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
ย 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
ย 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
ย 

SharePoint 2010 Training Session 5

  • 1. SharePoint 2010 Session - 5 By: Usman Zafar Malik [MCTS: MOSS 2007], [MSCBSS: CRM 3.0 / 4.0], MCP
  • 3. SharePoint 2010 Development โ€ข Simple Web parts โ€ข Advance Level Web parts
  • 5. Simple Web parts What are web parts? โ€ข Web Part is also called a Web Widget, is an ASP.NET server control which is added to a Web Part Zone on Web Part Pages by users at run time. It enable end users to modify the content, appearance, and behavior of Web pages directly from a browser. Possible scopes โ€ข Site Level.
  • 6. Simple Web parts Two types of web parts โ€ข Pure ASP.Net based web parts Derived from:- System.Web.UI.WebControls.WebParts.WebPart โ€“ Generic web parts, that can be used in SharePoint and outside the SharePoint domain. โ€ข SharePoint based web parts Derived from:- Microsoft.SharePoint.WebPartPages.WebPart โ€“ Only used in the SharePoint domain.
  • 7. Simple Web parts Further Categorization in Web parts โ€ข Web parts - A class derived from โ€œWebpartsโ€ class โ€ข Visual web parts - A class derived from โ€œWebpartsโ€ but also contains a user control in this web part. - Canโ€™t be used in sandboxed solutions.
  • 12. Simple Web parts Define properties in web parts The WebBrowseable attribute specifies that the decorated property should appear in the editor component of the web part. It only allows the end user to modify the property and does nothing about persistence. The Personalizable attribute specifies that the value of the decorated property must be persisted in the SharePoint backend, either in the user store (by default) or in the shared store (if the Shared scope is specified). It only cares about persistence and does nothing about the property presence in the editor component. So, if you decorate a property with [WebBrowsable] and not [Personalizable], the end user will be able to modify it in the editor component but its new value won't be persisted. Conversely, if you decorate a property with [Personalizable] and not [WebBrowsable], its value will be persisted but the end user won't be allowed to modify it.
  • 13. Simple Web parts Life Cycle OnInit OnLoad CreateChildControls OnPreRender SaveViewState Site Render RenderContents OnUnload Dispose
  • 18. Visual Web parts Life Cycle SimpleVisualWebPart - OnInit SimpleVisualWebPart - OnLoad SimpleVisualWebPart - CreateChildControls SimpleVisualWebPartUserControl - OnInit SimpleVisualWebPartUserControl - OnLoad SimpleVisualWebPartUserControl - Page_Load SimpleVisualWebPart - OnPreRender SimpleVisualWebPartUserControl - OnPreRender SimpleVisualWebPart - SaveViewState SimpleVisualWebPartUserControl - SaveViewState SimpleVisualWebPart - Render SimpleVisualWebPartUserControl - Render
  • 19. Visual Web parts Life Cycle SimpleVisualWebPart - RenderContents SimpleVisualWebPartUserControl - OnUnload SimpleVisualWebPartUserControl - Dispose SimpleVisualWebPart - OnUnload SimpleVisualWebPart - Dispose
  • 20. SharePoint 2010 Advance Level Web parts
  • 21. Advance Level Web parts Advance Level web parts? โ€ข Web part which contains toolpart, or we add some custom controls in Web part Editor Tool part section.
  • 22. Advance Level Web parts Advance Level web parts? โ€ข Web part which contains Custom Webpart Editor Section โ€ข Two ways to create Custom Editor Part / Toolpart of Web part โ€“ By inheriting class from โ€œMicrosoft.SharePoint.WebPartPages.ToolPartโ€ โ€“ By Implementing Interface โ€œIWebEditableโ€ on Toolpart class
  • 23. Advance Level Web parts Using Toolpart class
  • 24. Advance Level Web parts Using Toolpart class
  • 25. Advance Level Web parts using Toolpart class
  • 26. Advance Level Web parts using Toolpart class Three Level of ToolParts โ€“ WebPartToolPart โ€“ CustomPropertyToolPart โ€“ Add Custom ToolPart
  • 27. Advance Level Web parts using Toolpart class WebPartToolPart Default WebPart properties:- โ€ข Appearance โ€“ Title โ€“ Width โ€“ Frame State โ€“ Frame Style โ€ข Layout โ€“ Visible on Page โ€“ Direction โ€“ Zone โ€“ Part Order โ€ข Advanced โ€“ Allow Minimize โ€“ Allow Close โ€“ Allow Zone Change โ€“ Allow Export Sensitive Properties โ€“ Detail Link โ€“ Description โ€“ Help Link โ€“ Icon File (Large) โ€“ Icon File (Small) โ€“ Missing Assembly Error โ€“ Target Audiences
  • 28. Advance Level Web parts using Toolpart class CustomPropertyToolPart An additional ToolPart that is added when custom properties are added to the WebPart programmatically. Example:- First Name, Last Name
  • 29. Advance Level Web parts using Toolpart class CustomToolPart A toolpart which you have programmatically created and want to add in web part editor part. Example:- Derived Classes from โ€œMicrosoft.SharePoint.WebPartPages.ToolPartโ€ wants to add in the Web partโ€™s Editor section.
  • 30. Advance Level Web parts using Toolpart class public override Microsoft.SharePoint.WebPartPages.ToolPart[] GetToolParts() { PersonDetailsToolPart CustomToolPart_ = new PersonDetailsToolPart(); CustomToolPart_.Title = "Company Details"; Microsoft.SharePoint.WebPartPages.ToolPart[] toolParts = new Microsoft.SharePoint.WebPartPages.ToolPart[3]; toolParts[0] = new Microsoft.SharePoint.WebPartPages.WebPartToolPart(); toolParts[1] = new Microsoft.SharePoint.WebPartPages.CustomPropertyToolPart(); toolParts[2] = CustomToolPart_; return toolParts; } Override the โ€œGetToolParts()โ€ method in order to add the custom toolpart in to your web part editor part section.
  • 31. Advance Level Web parts using Toolpart class Common Webpart Properties this.AllowMinimize = true/false this.AllowHide = true/false; this.AllowClose = false; this.ChromeType = PartChromeType.None; (if user wants to remove the border of the web part )
  • 32. Advance Level Web parts using IWebEditable Interface Steps - The web part which has the Custom Editor Part must implement the โ€œIWebEditable โ€œinterface. #region IWebEditable Members EditorPartCollection IWebEditable.CreateEditorParts() { // Adding your custom web part editor part (Example:- CustomEditor) List<EditorPart> editors = new List<EditorPart>(); editors.Add(new CustomEditor()); return new EditorPartCollection(editors); } object IWebEditable.WebBrowsableObject { get { return this; } // what is being edited :- Returning the Web part itself. } #endregion
  • 33. Advance Level Web parts using IWebEditable Interface Steps - The Custom Editor Webpart must be inherited from โ€œEditorPartโ€ class. - It must overrides two methods. 1- ApplyChanges Used for copy content from Editor Part to Web part. 2- SyncChanges Used for Copy content from Web part to Editor Part.
  • 34. Q&A