I create a simple application page in visual studio 2010 and its deploying successfully. ( I follow this article http://www.c-sharpcorner.com/uploadfile/anavijai/how-to-create-custom-sharepoint-2010-application-page-using-visual-studio-2010/ )

Just need help how can I change the URL. right now its, /server/_layouts/customapp/app.aspx

but I am looking, /server/app.aspx or /server/pages/app.aspx similar like

any idea how can I do this?


You may want to use site page instead of application page.

Shortly, there are application pages and site pages.

Application pages are stored in Layouts folder in SharePoint Root folder. That’s why the url is with the ‘_layouts’ part. You have code behind but you can’t add web parts in application pages.

Site pages are stored in the content database as they are stored in document libraries. For example you can store a site page in Site Pages library and have a Url like “../Site Pages/page.aspx’. You can add web parts in site pages, but also if needed there are ways to add code behind in site pages too.


For "/server/app.aspx" just open SharePoint designer and copy page to root folder of your site. For "/server/pages/app.aspx" there are two approaches: 1. Create a document library, create web part page, make your web part from your application page and put this web part to this page; 2. Create "Pages" folder in root folder of site and copy your page to that folder.

There is general guideline - use application pages for addministrative purpose. Use web part, wiki or publishing pages for users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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