Quick Tip: Converting SharePoint 2010 Application Page to SharePoint 2007

May 10, 2011

This post is over a year old, some of this information may be out of date.

When you need to convert an application page from SharePoint 2010 to SharePoint 2007, these are the steps that need to be done:

  1. Change the “SharePoint.WebControls” and the “SharePoint.Utilities” assemblies version numbers from “14.0.0.0” to “12.0.0.0”;
  2. Remove the “Microsoft.Web.CommandUI” assembly line:
    Assembly Reference to be removed
    Assembly Reference to be removed
  3. Change the “DynamicMasterPageFile” attribute name to “MasterPageFile”, and replace the value with the following:
    MasterPageFile Attribute
    MasterPageFile Attribute

The result should be something like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationPage1.aspx.cs" Inherits="estruyf.Project.ApplicationPage1" MasterPageFile="~/_layouts/application.master" %>

Comments

comments powered by Disqus