Title: Windows SharePoint Services Development Part 2: Web Parts
1Windows SharePoint Services Development Part
2Web Parts Master Pages
- Petter Sørby
- Masterminds
- petter.sorby_at_masterminds.no
2Agenda
- Master Pages
- Feature activation/deactivation
- Web Parts
- Simple ASP.NET
- Connectable
3ASP.NET Integration Overview
- Better integration with ASP.NET
- More ASP.NET features shine through
- Still some conceptualdifferences SharePoint
has - Template Model
- Users can edit pages
Windows SharePoint Services v2
ASP.NET 1.1
ASP.NET 2.0
Windows SharePoint Services v3
4SharePoint For ASP.NET Developers
- Difference in Security Models
- Knowledge Workers can edit ASPX pages
- Thousands of Sites, Based on Template
- No-code Pages
- No code behind
- SafeControls
Customized ASPX Pages
Content Database
_layouts Application ASPX Pages
Web Front End
Template ASPX Pages
5User Interface Tools
- Customize look and feel of a site
- Customize Master Pages
- End-user customizable web user interface
- Build Web Parts
- Build a custom application
- Reusable UI Component
- Build a Control
- Application User Interface Pages
- Build a _layouts Page
- End-User Customizable Pages
- Build a Contents Page
- SharePoint List I/O
- Forms
6Master Page Concepts
- One page (master) holds the chrome
- Many pages point at the Master
- Master Page defines Placeholders which can be
overridden in child page
Master Page Chrome (default.master)
Content Page (default.aspx)
7Master Pages Placeholders
8Master Pages In WSS
- Each content page in WSS points to a master
page - Each WSS site has a Master Page Gallery (MPG)
- Site metadata indicates where WSS looks for a
master page - Content pages (e.g., default.aspx) default to the
per-site MPG - Application pages default to the_layouts
directory
9Master Page Tokens
- Two dynamic tokens
- masterurl/default.master
- Maps to spweb.MasterUrl
- masterurl/custom.master
- Maps to spweb.CustomMasterUrl
- Two static tokens
- sitecollection/default.master
- site/default.master
10SharePoint Page Layout
Content Pages - http//myserver/
Application Pages
spweb.MasterUrl
/_layouts/
application.master
/shared documents/
/
/_catalogs/masterpage/
.master
default.aspx
allitems.aspx
default.master
.aspx
.aspx
.master
/_layouts/
create.aspx
ghosting
Pages\
SiteTemplates\STS
Global\
.aspx
viewpage.aspx
default.master
default.aspx
File System - \.. \web server extensions\12\
11Master Pages In SharePoint Sites
12ASP.NET 2.0 Web Parts
13Web Parts
- End-user customizable controls
- Personalization store
- Web part framework now in ASP.NET
- Support for assembly-based ASP.NET 2.0 parts
- WSS Web Parts fully supported
- System.Web.UI.WebControls.WebParts
- Microsoft.SharePoint.WebPartPages.WebPart
- Improved in V3 User interface for Web Parts
14ASP.NET 2.0 Web Parts
15ASP.NET 2.0 Web Part Connections
16Integration Limitations
- Cannot use ASP.NET 2.0 Web Part Pages Not
directly compatible as-is - Pages must include SPWebPartZones and
SPWebPartManager - This is done to automatically handle
compatibility issues - No built-in support for treating .ASCX files
(user controls) as Web Parts - You can use .ASCXs in pages, though
- Wrappers for .ASCXs can and will be created