开发者

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

开发者 https://www.devze.com 2023-01-12 14:14 出处:网络
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

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.


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.


Most of the time I create a custom aspx that is using SharePoint's master page, and it's deployed inside SharePoint

See the Option 4 of this article

http://blogs.msdn.com/b/cjohnson/archive/2006/09/05/application-development-on-moss-2007-amp-wss-v3.aspx

And this is how I deploy the solution

http://blogs.msdn.com/b/cjohnson/archive/2007/12/15/building-a-simple-asp-net-page-based-sharepoint-application-in-visual-studio-with-the-visual-studio-extensions-for-wss-ctp-1-1.aspx

(I use this since somehow some-user can accidentally remove webparts on my previous web-part based implementation)

0

精彩评论

暂无评论...
验证码 换一张
取 消