sharepointweb-partsapplicationpage

How to Create a custom Application Page with webparts for sharepoint in VS2010?


I am very new to Sharepoint, and I am not 100% sure if this is the correct way to do this but here it goes. I have a very bare master page that I want to have a custom application page load up in. On that application page I want to have 2 web parts. I would like to be able to create and edit this application page inside of vs2010 so I can have it up on a team foundation server.

I have tried right clicking on my solution and add > new > application page, but i do not know how to get it to load up in my Sharepoint site and added into the master page or home page. I would be very appreciative if someone could point me in the right direction or give a more appropriate design plan. Thank you.


Solution

  • I was able to achieve what I wanted through a few simple steps.

    1. Inside sharepoint designer create a basic web parts page.
    2. In visual studio, create an application page. Add > New Item > Application page.
    3. Go back to the new web parts page you created in the sharepoint designer and copy the code and paste it into your new application page
    4. Inside your application page edit your the MasterPageFile attribute in your page declaration so the path to the master page is correct. Here is what my page declaration looks like:

    Now you have the start of a custom application page that can be edited in vs2010 and on your team foundation server.