If you don't know what application Page is, you can refer to the article I've written before. The page model for SharePoint 2010 has not changed much, and the basic and 2007 are consistent. Creating a application Page for SharePoint 2010 is much more convenient for developers than 2007, because Visual Studio 2010 provides good tool support.
As the following illustration shows, developers can add a application Page directly to a SharePoint project:
In SharePoint 2010, the custom application page is still inherited from the Microsoft.SharePoint.WebControls.LayoutsPageBase class by default:
In addition to support on the tools, SharePoint 2010 's application page already has access to the master page of the Web site, which means that after the designer has designed a custom master page for the site, application Page can also show the same effect as the Web site content page.
As the following illustration shows, by specifying the value of the "Dynamicmasterpagefile" attribute (note not "MasterPageFile") in the <@ page> tab of the Application Page page, you can let application Page directly uses the master page of the Web site that the user is currently browsing.
The value of the "Dynamicmasterpagefile" property can be:
"~masterurl/default.master": Represents the master page that will be identified using the Spweb.masterurl property, which defaults to the "V4.master" file in the Site Master page gallery.
"~masterurl/custom.master": Represents the master Page that will be identified by using the Spweb.custommasterurl property, which, by default, is consistent with the value of Spweb.masterurl and is referenced by the V4.master ".
If you still want application page to use the "Application.master" or "Applicationv4.master" in the "14\templates\_layouts" directory, do not use the " Dynamicmasterpagefile property, and you should still use the "MasterPageFile" property.
Although the "Dynamicmasterpagefile" property of the Application page allows application page to use the Web site's master page, the system administrator can also cancel this setting. In Web application Management in SharePoint 2010 Central Administration, by setting the options shown in the following illustration to no, the application page cannot refer to the master page of the Web site:
Of course, you can do the same thing with the object model:
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/web/sharepoint/
If you pass these two methods, the application page is not allowed to use the master page of the Web site, and the "Dynamicmasterpagefile" attribute is specified in "<@ page>", then application Page will look for "v4.master" in the "14\templates\layouts" directory.
Finally, the following special application page, because they may need to be displayed on any occasion (such as when the user is not authenticated), will use the simplest master page of "Simple.master":
Login.aspx
Signout.aspx
Error.aspx
Reqacc.aspx
Confirmation.aspx
Webdeleted.aspx
Accessdenied.aspx