SlideShare una empresa de Scribd logo
1 de 35
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 !

Más contenido relacionado

La actualidad más candente

User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6Damien 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 SitesICF 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.1ICF 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 AEMAdobeMarketingCloud
 
User interface customization for aem6 circuit
User interface customization for aem6 circuitUser interface customization for aem6 circuit
User interface customization for aem6 circuitDamien 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.0Buu 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 BootstrapRoy Kim
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization liteSharon 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 & FeaturesAbhinit 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/CQNetcetera
 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforceRinku Saini
 
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 PagecacheAjax Experience 2009
 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointRob 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 reportRinku Saini
 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadablepaulbastide
 
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 DemystifiedClaudio Procida
 

La actualidad más candente (20)

User Interface customization for AEM 6
User Interface customization for AEM 6User Interface customization for AEM 6
User Interface customization for AEM 6
 
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
 
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
 
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
 
User interface customization for aem6 circuit
User interface customization for aem6 circuitUser interface customization for aem6 circuit
User interface customization for aem6 circuit
 
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
 
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
 
Connections customization lite
Connections customization liteConnections customization lite
Connections customization lite
 
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
 
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
 
Introduction to visualforce
Introduction to visualforceIntroduction to visualforce
Introduction to visualforce
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
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
 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
 
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
 
Visualforce report
Visualforce reportVisualforce report
Visualforce report
 
Rails engines
Rails enginesRails engines
Rails engines
 
MAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - DownloadableMAS202 - Customizing IBM Connections - Downloadable
MAS202 - Customizing IBM Connections - Downloadable
 
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
 
Sling Dynamic Include
Sling Dynamic IncludeSling Dynamic Include
Sling Dynamic Include
 

Destacado

Upgrade webcast avoid the mess id
Upgrade webcast   avoid the mess idUpgrade webcast   avoid the mess id
Upgrade webcast avoid the mess idJoshua 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
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6Usman Zafar Malik
 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4Usman 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 1Usman Zafar Malik
 

Destacado (7)

Upgrade webcast avoid the mess id
Upgrade webcast   avoid the mess idUpgrade webcast   avoid the mess id
Upgrade webcast avoid the mess id
 
Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)Intranet design strategies2011 (nx power lite)
Intranet design strategies2011 (nx power lite)
 
SpaceTech4
SpaceTech4SpaceTech4
SpaceTech4
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
 
SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4SharePoint 2010 Training Session 4
SharePoint 2010 Training Session 4
 
SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)SharePoint Fundamentals (Lesson 1&2)
SharePoint Fundamentals (Lesson 1&2)
 
SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1SharePoint 2010 Training Session 1
SharePoint 2010 Training Session 1
 

Similar a SharePoint 2010 Training Session 5

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 NewLiquidHub
 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts NewLiquidHub
 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts NewLiquidHub
 
SharePoint Web part programming
SharePoint Web part programmingSharePoint Web part programming
SharePoint Web part programmingQuang 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 DevelopmentRob Windsor
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22Vivek chan
 
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 Langoswkadynamicscom
 
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 AEMAdobeMarketingCloud
 
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 AEMconnectwebex
 
SharePoint 2010 Customization Poster
SharePoint 2010 Customization PosterSharePoint 2010 Customization Poster
SharePoint 2010 Customization Posterbrendonschwartz
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with spparallelminder
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCBarry 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 MacDonaldWey 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 AppsAckee
 
12 asp.net session17
12 asp.net session1712 asp.net session17
12 asp.net session17Vivek chan
 

Similar a 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 ...
 
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...
 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
 
Creating Web Parts New
Creating Web Parts NewCreating Web Parts New
Creating Web Parts New
 
SharePoint Web part programming
SharePoint Web part programmingSharePoint Web part programming
SharePoint Web part programming
 
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...
 
Advanced SharePoint Web Part Development
Advanced SharePoint Web Part DevelopmentAdvanced SharePoint Web Part Development
Advanced SharePoint Web Part Development
 
Visualforce
VisualforceVisualforce
Visualforce
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 
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
 
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
 
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
 
SharePoint 2010 Customization Poster
SharePoint 2010 Customization PosterSharePoint 2010 Customization Poster
SharePoint 2010 Customization Poster
 
Parallelminds.asp.net with sp
Parallelminds.asp.net with spParallelminds.asp.net with sp
Parallelminds.asp.net with sp
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
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
 
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
 
WSS MOSS Portfolio
WSS MOSS PortfolioWSS MOSS Portfolio
WSS MOSS Portfolio
 
12 asp.net session17
12 asp.net session1712 asp.net session17
12 asp.net session17
 

Más de Usman Zafar Malik

SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3SharePoint 2010 Training Session 3
SharePoint 2010 Training Session 3Usman Zafar Malik
 
SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2SharePoint 2010 Training Session 2
SharePoint 2010 Training Session 2Usman Zafar Malik
 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanUsman Zafar Malik
 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanUsman Zafar Malik
 
Presentation Moss 2007 Usman
Presentation Moss 2007 UsmanPresentation Moss 2007 Usman
Presentation Moss 2007 UsmanUsman Zafar Malik
 

Más de Usman Zafar Malik (6)

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

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

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