SharePoint 2007 Development Recipes: A Problem-Solution Approach

Book description

SharePoint 2007 Development Recipes offers a range of ready--to--use code recipes that provide the building blocks for solving many common SharePoint 2007 programming dilemmas. This practical, hands--on guide categorizes recipes by problem area, for example site management, event handlers, users, lists, and web parts, and source code is provided in both VB and C#. As well as providing an invaluable reference, Mark Gerow also includes clear, supporting guidelines to help you modify the code samples for the broadest range of applications.

For each recipe you will find

  • Background and design considerations

  • Source code in both VB and C#

  • Discussion of variations on the provided examples

  • Cross--reference to core SharePoint classes

If you find yourself asking, "How do I solve this SharePoint development problem?" you will find all the answers in Mark Gerow's supremely useful book.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Reviewer
  4. Introduction
    1. Is This a "Beginner" or "Advanced" Book?
    2. How This Book Is Organized
      1. Recipe Type
      2. Ingredients
      3. Special Considerations
      4. Process Flow
      5. Recipe Code
      6. To Run
      7. Variations
      8. Related Recipes
    3. Have Fun with It!
  5. 1. Site Management
    1. 1.1. Creating a Site Collection by Using the Object Model
      1. 1.1.1. Recipe Type: .NET Console Application
      2. 1.1.2. Ingredients
        1. 1.1.2.1. Assembly References
        2. 1.1.2.2. Class Library References
      3. 1.1.3. Special Considerations
      4. 1.1.4. Process Flow
      5. 1.1.5. Recipe—VB (See CreateSiteCollectionConsole-VB, File Module1.vb)
      6. 1.1.6. Recipe—C# (See CreateSiteCollectionConsole-CS, File Program.cs)
      7. 1.1.7. To Run
      8. 1.1.8. Variations
    2. 1.2. Creating a Site Collection by Using Web Services
      1. 1.2.1. Recipe Type: ASP.NET Web Application
      2. 1.2.2. Ingredients
        1. 1.2.2.1. Web Services
      3. 1.2.3. Special Considerations
      4. 1.2.4. Process Flow
      5. 1.2.5. Recipe—ASPX (See Project CreateSiteCollectionWebService-VB, File Default.aspx)
      6. 1.2.6. Recipe—VB (See CreateSiteCollectionWebService-VB, Class Default.aspx.vb)
      7. 1.2.7. Recipe—C# (See CreateSiteCollectionWebService-CS, Class Default.aspx.cs)
      8. 1.2.8. To Run
      9. 1.2.9. Variations
    3. 1.3. Creating a Site (or Web) by Using the Object Model
      1. 1.3.1. Recipe Type: ASP.NET Console Application
      2. 1.3.2. Ingredients
        1. 1.3.2.1. Assembly References
        2. 1.3.2.2. Class Library References
      3. 1.3.3. Special Considerations
      4. 1.3.4. Process Flow
      5. 1.3.5. Recipe—VB (See Project CreateSiteConsole-VB, File Module1.vb)
      6. 1.3.6. Recipe—C# (See Project CreateSiteConsole-CS, File Program.cs)
      7. 1.3.7. To Run
      8. 1.3.8. Variations
    4. 1.4. Creating a Site (or Web) by Using a Web Service
      1. 1.4.1. Recipe Type: ASP.NET Web Application
      2. 1.4.2. Ingredients
        1. 1.4.2.1. Assembly References
        2. 1.4.2.2. Class Library References
        3. 1.4.2.3. Web Services References
      3. 1.4.3. Special Considerations
      4. 1.4.4. Process Flow: Web Service
      5. 1.4.5. Recipe—VB: Web Service (See Project CreateWebService-VB, Class Service.vb)
      6. 1.4.6. Recipe—VB: Web Form (See Project CreateWeb-VB, Class Default.aspx.vb)
      7. 1.4.7. Recipe—C#: Web Service (See Project CreateWebService-CS, Class Service.cs)
      8. 1.4.8. Recipe—C#: Web Form (See Project CreateWeb-CS, Class Default.aspx.cs)
      9. 1.4.9. To Run
      10. 1.4.10. Variations
    5. 1.5. Adding and Modifying Properties of a Site
      1. 1.5.1. Recipe Type: ASP.NET Web Application
      2. 1.5.2. Ingredients
        1. 1.5.2.1. Assembly References
        2. 1.5.2.2. Class Library References
      3. 1.5.3. Special Considerations
      4. 1.5.4. Preparation
      5. 1.5.5. Process Flow
      6. 1.5.6. Recipe—VB (See Project EditProperties-VB, Class Default.aspx.vb)
      7. 1.5.7. Recipe—C# (See Project EditSiteProperties, Class Default.aspx.cs)
      8. 1.5.8. To Run
      9. 1.5.9. Variations
    6. 1.6. Adding a Web Part by Using the Object Model
      1. 1.6.1. Recipe Type: .NET Console Application
      2. 1.6.2. Ingredients
        1. 1.6.2.1. Assembly References
        2. 1.6.2.2. Class Library References
      3. 1.6.3. Preparation
      4. 1.6.4. Process Flow: AddWebPart()
      5. 1.6.5. Recipe—VB (See Project AddWebPartOM-VB, Module Module1.vb)
      6. 1.6.6. Recipe—C# (See Project AddWebPartOM-CS, File Program.cs)
      7. 1.6.7. To Run
      8. 1.6.8. Variations
      9. 1.6.9. Related Recipes
    7. 1.7. Adding a Web Part by Using a .dwp or .webpart File
      1. 1.7.1. Recipe Type: .NET Console Application
      2. 1.7.2. Ingredients
        1. 1.7.2.1. Assembly References
        2. 1.7.2.2. Class Library References
      3. 1.7.3. Special Considerations
      4. 1.7.4. Preparation
      5. 1.7.5. Process Flow: AddWebPartDWP
      6. 1.7.6. Recipe—VB (See Project AddWebPartDWP-VB, Module Module1.vb)
      7. 1.7.7. Recipe—C# (See Project AddWebPartDWP-CS, File Program.cs)
      8. 1.7.8. To Run
    8. 1.8. Calculating Storage for all Document Libraries in a Site
      1. 1.8.1. Recipe Type: .NET Web Application
      2. 1.8.2. Ingredients
        1. 1.8.2.1. Assembly References
        2. 1.8.2.2. Class Library References
      3. 1.8.3. Special Considerations
      4. 1.8.4. Preparation
      5. 1.8.5. Process Flow
      6. 1.8.6. Recipe—VB (See Project DocLibStorage-VB, Class Default.aspx.vb)
      7. 1.8.7. Recipe—C# (See Project DocLibStorage-CS, Class Default.aspx.cs)
      8. 1.8.8. To Run
      9. 1.8.9. Variations
    9. 1.9. Creating a Script to Back Up All Site Collections by Using STSADM
      1. 1.9.1. Recipe Type: Windows Command Script (.vbs)
      2. 1.9.2. Ingredients
      3. 1.9.3. Special Considerations
      4. 1.9.4. Preparation
      5. 1.9.5. Process Flow
      6. 1.9.6. Recipe—VBScript
      7. 1.9.7. To Run
      8. 1.9.8. Variations
  6. 2. Working with Users
    1. 2.1. Obtaining and Displaying Users of a Site
      1. 2.1.1. Recipe Type: ASP.NET Web Application
      2. 2.1.2. Ingredients
        1. 2.1.2.1. Assembly References
        2. 2.1.2.2. Class Library References
        3. 2.1.2.3. Classes Used
      3. 2.1.3. Special Considerations
      4. 2.1.4. Preparation
      5. 2.1.5. Process Flow: GetAllSiteUsers
      6. 2.1.6. Recipe—VB (See Project ObtainUsersInSite-VB, Class Default.aspx.vb)
      7. 2.1.7. Recipe—C# (See Project ObtainUsersInSite-CS, Class Default.aspx.cs)
      8. 2.1.8. To Run
      9. 2.1.9. Variations
    2. 2.2. Adding Users to a Site by Using the Object Model
      1. 2.2.1. Recipe Type: .NET Console Application
      2. 2.2.2. Ingredients
        1. 2.2.2.1. Assembly References
        2. 2.2.2.2. Class Library References
      3. 2.2.3. Special Considerations
      4. 2.2.4. Preparation
      5. 2.2.5. Process Flow
      6. 2.2.6. Recipe—VB (See Project AddUsersOM-VB, Module Module1.vb)
      7. 2.2.7. Recipe—C# (See Project AddUserOM-CS, File Program.cs)
      8. 2.2.8. To Run
      9. 2.2.9. Variations
    3. 2.3. Adding Users and Groups to a Site by Using the Web Services
      1. 2.3.1. Recipe Type: .NET Console Application
      2. 2.3.2. Ingredients
        1. 2.3.2.1. Web Services References
      3. 2.3.3. Special Considerations
      4. 2.3.4. Preparation
      5. 2.3.5. Process Flow
      6. 2.3.6. Recipe—VB (See Project AddUserWS-VB, Module Module1.vb)
      7. 2.3.7. Recipe—C# (See Project AddUserWS-CS, File Program.cs)
      8. 2.3.8. To Run
      9. 2.3.9. Variations
    4. 2.4. Adding Groups to a Site by Using the Object Model
      1. 2.4.1. Recipe Type: .NET Console Application
      2. 2.4.2. Ingredients
        1. 2.4.2.1. Assembly References
        2. 2.4.2.2. Class Library References
        3. 2.4.2.3. Classes Used
      3. 2.4.3. Special Considerations
      4. 2.4.4. Preparation
      5. 2.4.5. Process Flow
      6. 2.4.6. Recipe—VB (See Project AddGroupOM-VB, Module Module1.vb)
      7. 2.4.7. Recipe—C# (See Project AddGroupOM-CS, File Program.cs)
      8. 2.4.8. To Run
      9. 2.4.9. Variations
    5. 2.5. Adding Roles to a Web Site by Using the Object Model
      1. 2.5.1. Recipe Type: .NET Console Application
      2. 2.5.2. Ingredients
        1. 2.5.2.1. Assembly References
        2. 2.5.2.2. Class Library References
        3. 2.5.2.3. Classes Used
      3. 2.5.3. Special Considerations
      4. 2.5.4. Preparation
      5. 2.5.5. Process Flow
      6. 2.5.6. Recipe—VB (See Project AddRoleOM-VB, Module Module1.vb)
      7. 2.5.7. Recipe—C# (See Project AddRoleOM-CS, File Program.cs)
      8. 2.5.8. To Run
      9. 2.5.9. Variations
    6. 2.6. Adding Roles to a Web Site by Using the Web Services
      1. 2.6.1. Recipe Type: ASP.NET Web Application
      2. 2.6.2. Ingredients
        1. 2.6.2.1. Assembly References
        2. 2.6.2.2. Class Library References
        3. 2.6.2.3. Web Services References
        4. 2.6.2.4. Classes Used
      3. 2.6.3. Special Considerations
      4. 2.6.4. Preparation
      5. 2.6.5. Process Flow: GetPermissionFlags()
      6. 2.6.6. Recipe—ASPX (See Project AddRoleWS-CS, File Default.aspx)
      7. 2.6.7. Recipe—VB (See Project AddRoleWS-VB, Class Default.aspx.vb)
      8. 2.6.8. Recipe—C# (See Project AddRoleWS-CS, Class Default.aspx.cs)
      9. 2.6.9. To Run
      10. 2.6.10. Variations
    7. 2.7. Adding Users to Active Directory
      1. 2.7.1. Recipe Type: ASP.NET Web Service
      2. 2.7.2. Ingredients
        1. 2.7.2.1. Assembly References
      3. 2.7.3. Special Considerations
      4. 2.7.4. Preparation
      5. 2.7.5. Process Flow
      6. 2.7.6. Recipe—VB (See Project AddUserToADService-VB, Class Service.vb)
      7. 2.7.7. Recipe—C# (See Project AddUserToADService-CS, Class Service.cs)
      8. 2.7.8. To Run
      9. 2.7.9. Variations
  7. 3. Working with Lists
    1. 3.1. Creating a List by Using the Object Model
      1. 3.1.1. Recipe Type: ASP.NET Web Application
      2. 3.1.2. Ingredients
        1. 3.1.2.1. Assembly References
        2. 3.1.2.2. Class Library References
        3. 3.1.2.3. Classes Used
      3. 3.1.3. Special Considerations
      4. 3.1.4. Preparation
      5. 3.1.5. Process Flow
      6. 3.1.6. Recipe—VB (See Project CreateListOM-VB, Form Default.aspx.vb)
      7. 3.1.7. Recipe—C# (See Project CreateListOM-CS, Form Default.aspx.cs)
      8. 3.1.8. To Run
      9. 3.1.9. Variations
      10. 3.1.10. Related Recipes
    2. 3.2. Creating a List by Using Web Services
      1. 3.2.1. Recipe Type: ASP.NET Web Application
      2. 3.2.2. Ingredients
        1. 3.2.2.1. Web Service References
        2. 3.2.2.2. Class Library References
      3. 3.2.3. Special Considerations
      4. 3.2.4. Preparation
      5. 3.2.5. Process Flow
      6. 3.2.6. Recipe—VB (See Project CreateListService-VB, Form Default.aspx.vb)
      7. 3.2.7. Recipe—C# (See Project CreateListOM-CS, Form Default.aspx.cs)
      8. 3.2.8. To Run
      9. 3.2.9. Variations
      10. 3.2.10. Related Recipes
    3. 3.3. Updating a List by Using the Object Model
      1. 3.3.1. Recipe Type: ASP.NET Web Application
      2. 3.3.2. Ingredients
        1. 3.3.2.1. Assembly References
        2. 3.3.2.2. Library References
        3. 3.3.2.3. Classes Used
      3. 3.3.3. Special Considerations
      4. 3.3.4. Preparation
      5. 3.3.5. Process Flow
      6. 3.3.6. Recipe—VB (See Project UpdateListOM-VB Form Default.aspx.vb)
      7. 3.3.7. Recipe—C# (See Project UpdateListOM-CS Form Default.aspx.cs)
      8. 3.3.8. To Run
      9. 3.3.9. Variations
      10. 3.3.10. Related Recipes
    4. 3.4. Updating a List by Using Web Services
      1. 3.4.1. Recipe Type: ASP.NET Web Application
      2. 3.4.2. Ingredients
        1. 3.4.2.1. Web Service References
        2. 3.4.2.2. Classes Used
      3. 3.4.3. Special Considerations
      4. 3.4.4. Preparation
      5. 3.4.5. Process Flow: UpdateListWS
      6. 3.4.6. Recipe—VB (See Project UpdateListWS-VB, Form Default.aspx.vb)
      7. 3.4.7. Recipe—C# (See Project UpdateListWS-CS, Form Default.aspx.cs)
      8. 3.4.8. To Run
      9. 3.4.9. Variations
      10. 3.4.10. Related Recipes
    5. 3.5. Adding a Document to a Document Library by Using the Object Model
      1. 3.5.1. Recipe Type: ASP.NET Web Application
      2. 3.5.2. Ingredients
        1. 3.5.2.1. Assembly References
        2. 3.5.2.2. Class Library References
        3. 3.5.2.3. Classes Used
      3. 3.5.3. Special Considerations
      4. 3.5.4. Preparation
      5. 3.5.5. Process Flow
      6. 3.5.6. Recipe—VB (See Project FileUploadOM-VB, Form Default.aspx.vb)
      7. 3.5.7. Recipe—C# (See Project FileUploadOM-CS, Form Default.aspx.cs)
      8. 3.5.8. To Run
      9. 3.5.9. Variations
      10. 3.5.10. Related Recipes
    6. 3.6. Adding a Document to a Document Library by Using Web Services
      1. 3.6.1. Recipe Type: ASP.NET Web Service and Console Application
      2. 3.6.2. Ingredients
        1. 3.6.2.1. Assembly References
        2. 3.6.2.2. Class Library References
        3. 3.6.2.3. Classes Used
      3. 3.6.3. Special Considerations
      4. 3.6.4. Preparation
      5. 3.6.5. Process Flow
      6. 3.6.6. Recipe—VB: FileUploadService (See Project FileUploadService-VB, Class Service.vb)
      7. 3.6.7. Recipe—C#: FileUploadService (See Project FileUploadService, Class Service.cs)
      8. 3.6.8. Recipe—C#: TestFileUploadService
      9. 3.6.9. To Run
      10. 3.6.10. Variations
      11. 3.6.11. Related Recipes
  8. 4. Working with Web Parts
    1. 4.1. Creating a Simple RSS Feed Web Part
      1. 4.1.1. Recipe Type: Web Part
      2. 4.1.2. Ingredients
        1. 4.1.2.1. Assembly References
        2. 4.1.2.2. Class Library References
      3. 4.1.3. Special Considerations
      4. 4.1.4. Preparation
      5. 4.1.5. Process Flow
      6. 4.1.6. Recipe—VB (See Project RSSWebPartVB, Class RSSWebPartVB.vb)
      7. 4.1.7. Recipe—C# (See Project RSSWebPartCS, Class RSSWebPart.cs)
      8. 4.1.8. To Run
      9. 4.1.9. Variations
    2. 4.2. Creating an XML Web Part
      1. 4.2.1. Recipe Type: Web Part
      2. 4.2.2. Ingredients
        1. 4.2.2.1. Assembly References
      3. 4.2.3. Special Considerations
      4. 4.2.4. Preparation
      5. 4.2.5. Process Flow
      6. 4.2.6. Recipe—VB (See Project XMLWebPartVB, Class XMLWebPart.vb)
      7. 4.2.7. Recipe—C# (See Project XMLWebPartCS, Class XMLWebPart.cs)
      8. 4.2.8. Recipe—XML Document (See Project XMLWebPartCS, File SampleXMLSource.xml)
      9. 4.2.9. Recipe—XSLT
      10. 4.2.10. To Run
      11. 4.2.11. Variations
    3. 4.3. Creating a SQL Web Part
      1. 4.3.1. Recipe Type: Web Part
      2. 4.3.2. Ingredients
        1. 4.3.2.1. Class Library References
      3. 4.3.3. Special Considerations
      4. 4.3.4. Preparation
      5. 4.3.5. Process Flow
      6. 4.3.6. Recipe—VB (See Project SQLWebPartVB, Class SQLWebPart.vb)
      7. 4.3.7. Recipe—C# (See Project SQLWebPartCS, Class SQLWebPartCS.cs)
      8. 4.3.8. Recipe—XSLT (See Project SQLWebPartVB, File Presidents.xslt)
      9. 4.3.9. To Run
      10. 4.3.10. Variations
    4. 4.4. Creating a Page Viewer Web Part
      1. 4.4.1. Recipe Type: Web Part
      2. 4.4.2. Ingredients
        1. 4.4.2.1. Class Library References
      3. 4.4.3. Special Considerations
      4. 4.4.4. Preparation
      5. 4.4.5. Process Flow
      6. 4.4.6. Recipe—VB (See Project PageViewerWebPartVB, Class PageViewerWebPartVB.vb)
      7. 4.4.7. Recipe—C# (See Project PageViewerWebPartCS, Class PageViewerWebPartCS.cs)
      8. 4.4.8. To Run
      9. 4.4.9. Variations
    5. 4.5. Creating a Connectable Page Viewer Web Part
      1. 4.5.1. Recipe Type: Web Part
      2. 4.5.2. Ingredients
        1. 4.5.2.1. Class Library References
      3. 4.5.3. Special Considerations
      4. 4.5.4. Preparation
      5. 4.5.5. Process Flow
      6. 4.5.6. Recipe—VB (See Project ConnectablePageViewerVB, Class ConnectablePageViewerVB.vb)
      7. 4.5.7. Recipe—C# (See Project ConnectablePageViewerCS, Class ConnectablePageViewerCS.cs)
      8. 4.5.8. To Run
      9. 4.5.9. Related Recipes
    6. 4.6. Reading Web-Part Parameters from the Querystring
      1. 4.6.1. Recipe Type: Web Part
      2. 4.6.2. Ingredients
        1. 4.6.2.1. Assembly References
      3. 4.6.3. Special Considerations
      4. 4.6.4. Preparation
      5. 4.6.5. Process Flow
      6. 4.6.6. Recipe—VB (See Project QuerystringWebPartVB, Class QuerystringWebPart.vb)
      7. 4.6.7. Recipe—C# (See Project QuerystringWebPartCS, Class QuerystringWebPart.cs)
      8. 4.6.8. Recipe—Clients.xslt (See Project QuerystringWebPartCS, File Clients.xslt)
      9. 4.6.9. To Run
      10. 4.6.10. Variations
      11. 4.6.11. Related Recipes
    7. 4.7. Using the SmartPart to Expose a .NET User Control
      1. 4.7.1. Recipe Type: Web Part
      2. 4.7.2. Ingredients
        1. 4.7.2.1. Classes Used
        2. 4.7.2.2. Other Ingredients
      3. 4.7.3. Special Considerations
      4. 4.7.4. Preparation
      5. 4.7.5. Process Flow: GetProfileStatus()
      6. 4.7.6. Process Flow: UpdateStatus()
      7. 4.7.7. Recipe—Page Layout (See Project SmartPartStatusWebPartCS, File SmartPartStatusWebPart.ascx)
      8. 4.7.8. Recipe—VB (See Project SmartPartStatusWebPartCS, Code-Behind SmartPartStatusWebPart.ascx.vb)
      9. 4.7.9. Recipe—C# (See Project SmartPartStatusWebPartCS, Code-Behind SmartPartStatusWebPartCS.ascx.cs)
      10. 4.7.10. To Run
    8. 4.8. Creating a ZoneTab Web Part
      1. 4.8.1. Recipe Type: Web Part
      2. 4.8.2. Ingredients
        1. 4.8.2.1. Assembly References
      3. 4.8.3. Special Considerations
      4. 4.8.4. Preparation
      5. 4.8.5. Process Flow: CreateChildControls()
      6. 4.8.6. Process Flow: ShowHideWebParts()
      7. 4.8.7. Recipe—VB (See Project ZoneTabWebPartVB, Class ZoneTabWebPart.vb)
      8. 4.8.8. Recipe—C# (See Project ZoneTabWebPartCS, Class ZoneTabWebPart.cs)
      9. 4.8.9. To Run
      10. 4.8.10. Variations
    9. 4.9. Creating a Web Part to Edit SPWeb Properties
      1. 4.9.1. Recipe Type: Web Part
      2. 4.9.2. Ingredients
        1. 4.9.2.1. Assembly References
      3. 4.9.3. Special Considerations
      4. 4.9.4. Preparation
      5. 4.9.5. Process Flow: CreateChildControls()
      6. 4.9.6. Process Flow: btn_Click()
      7. 4.9.7. Process Flow: delbtn_Click()
      8. 4.9.8. Recipe—VB (See Project WebPropertiesWebPartVB, Class WebPropertiesWebPart.vb)
      9. 4.9.9. Recipe—C# (See Project WebPartPropertiesCS, Class WebPartProperties.cs)
      10. 4.9.10. To Run
      11. 4.9.11. Variations
  9. 5. Working with Event Handlers
    1. 5.1. Why Create an Event Handler?
    2. 5.2. When to Use an Event Handler Rather Than a Workflow?
    3. 5.3. Event Handler Enhancements in SharePoint 2007
      1. 5.3.1. Support for All List Types
      2. 5.3.2. More Events
    4. 5.4. Updating List Fields When Adding a Document to a Document Library
      1. 5.4.1. Recipe Type: Event Handler
      2. 5.4.2. Ingredients
        1. 5.4.2.1. Assembly References
        2. 5.4.2.2. Class Library References
        3. 5.4.2.3. Classes Used
      3. 5.4.3. Special Considerations
      4. 5.4.4. Preparation
      5. 5.4.5. Process Flow
      6. 5.4.6. Recipe—VB (See Project SetDocumentFields-VB, Class Class1.vb)
      7. 5.4.7. Recipe—VB: Installer (See Project InstallSetDocumentFields-VB, Module Module1.vb)
      8. 5.4.8. Recipe—C#: Event Handler (See Project SetDocumentFields-CS, Class SetDocumentFields.cs)
      9. 5.4.9. Recipe—C#: Installer (See Project InstallSetDocumentFields-CS, Class Program.cs)
      10. 5.4.10. To Run
      11. 5.4.11. Variations
    5. 5.5. Sending an Email When a Task Is Completed
      1. 5.5.1. Recipe Type: Event Handler
      2. 5.5.2. Ingredients
        1. 5.5.2.1. Assembly References
        2. 5.5.2.2. Class Library References
        3. 5.5.2.3. Classes Used
      3. 5.5.3. Special Considerations
      4. 5.5.4. Preparation
      5. 5.5.5. Process Flow
      6. 5.5.6. Recipe—VB: Event Handler (See Project SendEmail-VB, Class SendEmail.vb)
      7. 5.5.7. Recipe—VB: Installer (See Project InstallSendEmail-VB, Class Class1.vb)
      8. 5.5.8. Recipe—C#: Event Handler (See Project SendEmail-CS, Class SendEmail.cs)
      9. 5.5.9. Recipe—C#: Installer (See Project InstallSendEmail-CS, Class Program.cs)
      10. 5.5.10. To Run
      11. 5.5.11. Variations
    6. 5.6. Preventing Deletion by Using an Event Handler
      1. 5.6.1. Recipe Type: Event Handler
      2. 5.6.2. Ingredients
        1. 5.6.2.1. Assembly References
        2. 5.6.2.2. Class Library References
        3. 5.6.2.3. Classes Used
      3. 5.6.3. Special Considerations
      4. 5.6.4. Preparation
      5. 5.6.5. Process Flow
      6. 5.6.6. Recipe—VB: Event Handler (See Project PreventDeletion-VB, Class PreventDeletion.vb)
      7. 5.6.7. Recipe—VB: Installer (See Project InstallPreventDeletion-VB, Module Module1.vb)
      8. 5.6.8. Recipe—C#: Event Handler (See Project PreventDeletion-CS, Class PreventDeletion.cs)
      9. 5.6.9. Recipe—C#: Installer (See Project InstallPreventDeletion-CS, Class Program.cs)
      10. 5.6.10. To Run
      11. 5.6.11. Variations
      12. 5.6.12. Related Recipes
    7. 5.7. Creating a Calculated Field by Using an Event Handler
      1. 5.7.1. Recipe Type: Event Handler
      2. 5.7.2. Ingredients
        1. 5.7.2.1. Assembly References
        2. 5.7.2.2. Class Library References
      3. 5.7.3. Special Considerations
      4. 5.7.4. Preparation
      5. 5.7.5. Process Flow
      6. 5.7.6. Recipe—VB: Event Handler (See Project UpdateFieldsEventHandler-VB, Class UpdateFieldsEventHandler.vb)
      7. 5.7.7. Recipe—VB: Installer (See Project InstallUpdateFieldsEventHandler-VB, Module Module1.vb)
      8. 5.7.8. Recipe—C#: Event Handler (See Project UpdateFieldsEventHandler-CS, Class UpdateFieldsEventHandler.cs)
      9. 5.7.9. Recipe—C#: Installer (See Project InstallUpdateFieldsEventHandler-CS, Class Program.cs)
      10. 5.7.10. To Run
      11. 5.7.11. Variations
      12. 5.7.12. Related Recipes
  10. 6. Working with Templates and Other XML Files
    1. 6.1. Adding a PDF Image to Docicon.xml
      1. 6.1.1. Recipe Type: CAML
      2. 6.1.2. Ingredients
      3. 6.1.3. Special Considerations
      4. 6.1.4. Preparation
      5. 6.1.5. Process Flow
      6. 6.1.6. Recipe—PDF Entry in Docicon.xml
      7. 6.1.7. To Run
    2. 6.2. Adding Custom Menus by Using a Feature
      1. 6.2.1. Recipe Type: Feature + ASP.NET Web Application
      2. 6.2.2. Ingredients
        1. 6.2.2.1. Assembly References
        2. 6.2.2.2. Class Library References
        3. 6.2.2.3. Classes Used
      3. 6.2.3. Special Considerations
      4. 6.2.4. Preparation
      5. 6.2.5. Process Flow
      6. 6.2.6. Recipe—Feature
      7. 6.2.7. Recipe—Feature Element
      8. 6.2.8. Recipe—Installer Script
      9. 6.2.9. Recipe—VB: Default.aspx (See Project AddComment-VB, Class Default.aspx.vb)
      10. 6.2.10. Recipe—C#: Default.aspx (See Project AddComment, Class Default.aspx.cs)
      11. 6.2.11. Web.config Changes
      12. 6.2.12. IIS Configuration
      13. 6.2.13. To Run
    3. 6.3. Adding Web Parts Through Onet.xml
      1. 6.3.1. Recipe Type: CAML
      2. 6.3.2. Ingredients
      3. 6.3.3. Special Considerations
      4. 6.3.4. Preparation
      5. 6.3.5. Recipe—Page Viewer Web Part
      6. 6.3.6. Recipe—Content Editor Web Part
      7. 6.3.7. To Run
      8. 6.3.8. Variations
      9. 6.3.9. Related Recipes
    4. 6.4. Adding an ExecuteUrl Directive to Onet.xml
      1. 6.4.1. Recipe Type: CAML + ASP.NET
      2. 6.4.2. Ingredients
        1. 6.4.2.1. Assembly References
        2. 6.4.2.2. Class Library References
        3. 6.4.2.3. Other Ingredients
      3. 6.4.3. Special Considerations
      4. 6.4.4. Preparation
      5. 6.4.5. Process Flow: Finish_Click()
      6. 6.4.6. Page Layout: SelectWebParts.aspx
      7. 6.4.7. Recipe—VB (See Project SelectWebParts-VB, Class SelectWebParts.aspx.vb)
      8. 6.4.8. Recipe—C# (See Project SelectWebParts-CS, Class SelectWebParts.aspx.cs)
      9. 6.4.9. To Run
      10. 6.4.10. Variations
      11. 6.4.11. Related Recipes
  11. 7. Modifying Pages with JavaScript
    1. 7.1. Hiding the QuickLaunch Menu
      1. 7.1.1. Recipe Type: JavaScript
      2. 7.1.2. Ingredients
      3. 7.1.3. Special Considerations
      4. 7.1.4. Preparation
      5. 7.1.5. Process Flow
      6. 7.1.6. Recipe—JavaScript
      7. 7.1.7. To Run
      8. 7.1.8. Variations
      9. 7.1.9. Related Recipes
    2. 7.2. Opening List Items in a New Window
      1. 7.2.1. Recipe Type: JavaScript
      2. 7.2.2. Ingredients
      3. 7.2.3. Special Considerations
      4. 7.2.4. Preparation
      5. 7.2.5. Process Flow
      6. 7.2.6. Recipe—Content Editor
      7. 7.2.7. Recipe—Library
      8. 7.2.8. To Run
      9. 7.2.9. Variations
      10. 7.2.10. Related Recipes
  12. 8. Advanced Dishes
    1. 8.1. Customizing the STSADM Command
      1. 8.1.1. Recipe Type: STSADM Extension
      2. 8.1.2. Ingredients
        1. 8.1.2.1. Assembly References
      3. 8.1.3. Special Considerations
      4. 8.1.4. Preparation
      5. 8.1.5. Process Flow
      6. 8.1.6. Recipe—XML (See Project CustomizeSTSADM-CS, File stsadmcommands.recipes.xml)
      7. 8.1.7. Recipe—C# (See Project CustomizeSTSADM-CS, CustomizeSTSADM-CS.cs)
      8. 8.1.8. To Run
      9. 8.1.9. Variations
      10. 8.1.10. Related Recipes
    2. 8.2. Crawling a Database Table by Using a BDC Schema
      1. 8.2.1. Recipe Type: BDC Schema
      2. 8.2.2. Ingredients
      3. 8.2.3. Special Considerations
      4. 8.2.4. Preparation
      5. 8.2.5. Recipe—BDC Schema XML
      6. 8.2.6. To Run
      7. 8.2.7. Variations
      8. 8.2.8. Related Recipes
    3. 8.3. Creating a Custom MOSS Search Page
      1. 8.3.1. Recipe Type: ASP.NET Application
      2. 8.3.2. Ingredients
        1. 8.3.2.1. Assembly References
      3. 8.3.3. Special Considerations
      4. 8.3.4. Preparation
      5. 8.3.5. Process Flow
      6. 8.3.6. Recipe—ASPX (See Project CustomizingSearch-CS, File CustomizingSearch.aspx)
      7. 8.3.7. Recipe—VB (See Project CustomizingSearch-VB, Class CustomizingSearch.aspx.vb)
      8. 8.3.8. Recipe—C# (See Project CustomizingSearch-CS, Class CustomizingSearch.aspx.cs)
      9. 8.3.9. To Run
      10. 8.3.10. Variations
      11. 8.3.11. Related Recipes

Product information

  • Title: SharePoint 2007 Development Recipes: A Problem-Solution Approach
  • Author(s): Mark E. Gerow
  • Release date: February 2006
  • Publisher(s): Apress
  • ISBN: 9781430209614