Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced Microsoft Content Management Server Development

You're reading from   Advanced Microsoft Content Management Server Development Working with the Publishing API, Placeholders, Search, Web Services, RSS, and Sharepoint Integration

Arrow left icon
Product type Paperback
Published in Nov 2005
Publisher Packt
ISBN-13 9781904811534
Length 544 pages
Edition 1st Edition
Concepts
Arrow right icon
Toc

Table of Contents (21) Chapters Close

Advanced Microsoft Content Management Server Development
Credits
About the Authors
About the Reviewers
1. Building CMS Explorer FREE CHAPTER 2. Managing Channels and Postings with the PAPI 3. Managing Templates, Template Galleries, and Resources 4. Preparing Postings for Search Indexing 5. Searching MCMS with SharePoint 6. Publishing Content Between MCMS and SharePoint 7. Building SharePoint Web Parts 8. Useful Placeholder Controls 9. Validating Placeholder Controls 10. Staging Static Pages 11. InfoPath with MCMS Web Services 12. MCMS and RSS 13. Essential How-Tos, Tips, and Tricks 1. Setting up MCMS and SPS on the Same Virtual Server 2. MCMS Connector for SharePoint Technologies 3. Installing the Tropical Green Website Index

Creating the Workspace


Let’s start by creating a work area for the CMS Explorer tool. Create a new Visual C# MCMS Web Application Project in Visual Studio .NET.

  1. 1. Name the new project CMSExplorer.

  2. 2. Get the Styles.css file from the book’s code download. Select Project | Add Existing Item and add it to the CMSExplorer project.

  3. 3. Create a new folder and name it images. Download the image files for this tutorial from the code download section of the book’s companion website and add them to the project.

  4. 4. Right-click the CMSExplorer project in the Solution Explorer and select Properties. Click Designer Defaults. Set the Page Layout field to Flow. This will set the default layout to flow instead of grid for all web forms created in the project. Click OK.

  5. 5. Right-click the Console folder and select Delete.

  6. 6. Add a new web form to the CMSExplorer project, and name it default.aspx.

  7. 7. In Design view, drag and drop the Styles.css file from Solution Explorer onto the form. This applies the stylesheet to the page.

  8. 8. Switch to HTML view. Add the table below between the <form> tags to provide the basic structure of the page. We use a litCurrentContainer Literal control to display the name of the current container. The lblPublishingMode Label will be used later to display the current publishing mode.

    <table cellSpacing="0" cellPadding="0">
    <tr>
      <td>
        <table>
        <tr>
          <td valign="top">
            <asp:Image runat="server" ID="imgTitle"></asp:Image>
          </td>
          <td valign="center">
            <h1>
              <asp:Literal ID="litCurrentContainer" runat="server"/>
            </h1>
          </td>
        </tr>
        </table>
        <asp:Label ID="lblPublishingMode" runat="server"
             CssClass="BodyText"/>
      </td>
    </tr>
    
    <tr>
      <td width="100%" bgcolor="#cccccc">(Space for Toolbar)</td>
    </tr>
    
    <tr>
      <td>(Space for DataGrid)</td>
    </tr>
    </table>
  9. 9. Toggle to Design view. Double-click on the form to get to its code-behind file. Above the namespace declaration, import the Microsoft.ContentManagement.Publishing namespace.

    							//MCMS PAPI
    							using Microsoft.ContentManagement.Publishing;
    
    namespace CMSExplorer
    {
      /// <summary>
      /// Summary description for _default.
      /// </summary>
      public class _default : System.Web.UI.Page
      {
    
        . . . code continues . . .
      }
    }
You have been reading a chapter from
Advanced Microsoft Content Management Server Development
Published in: Nov 2005
Publisher: Packt
ISBN-13: 9781904811534
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image