Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a application page and I want it's design layout to look something like the standard Sharepoint pages like Add site column(fldNew.aspx) page. Could someone tell me how to accomplish this?

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

To mimic design of eq fldnew.aspx just go to \14\TEMPLATE\LAYOUTS on your SP server and find FldNew.aspx. Open it and copy page layout to your custom application page. But be careful not to break your custom application code inheritance!

After that you can play with design and add your own controls/code.

It is good practice to take a look at markup of some OOTB SP application pages when developing your custom ones. By doing so you will keep visual identity of SP intact.

share|improve this answer
    
thanks Vedran.. i'll give a try –  Kannan Jan 12 '12 at 6:43
add comment

Your application page should be using a master page of the SharePoint site to accomplish this. Adding a code in your page OnPreInit might work -

protected override void OnPreInit(EventArgs e)
{
 base.OnPreInit(e);
 this.MasterPageFile =  SPContext.Current.Web.MasterUrl;
}

Check this blog post for similar ideas.

share|improve this answer
    
Thanks deepu.. I'll give a try –  Kannan Jan 12 '12 at 6:20
add comment

Application pages are now branded by default in SharePoint 2010.

The DynamicMasterPageFile attribute in SharePoint 2010 master pages allows application pages start using the site’s master page instead of the application master page. If you want backwards compatibility with SharePoint 2007, i.e. you want unbranded application pages, here is what you can do,

a) You can change the MasterPageReferenceEnabled property to false in your SPWebApplication object, or b) Go to central administration\application management\manage web application\select your web app … go to the ribbon, look for general settings\general settings, and detach application pages from the site’s master page.

share|improve this answer
    
Hi Free Styler, Thanks for you reply... I'm looking for a solution as proposed by Vedran... –  Kannan Jan 12 '12 at 6:44
add comment

If you would like to use default sharepoint master page you should use DynamicMasterPageFile in aspx file.

for example, you can find this directive in /_layouts/settings.aspx

<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.ApplicationPages.SettingsPage"   EnableViewState="false" EnableViewStateMac="false"    %>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.