简体   繁体   中英

Deploy aspx page as part of a Sharepoint 2010 Feature

I am trying to find a way to deploy pre-built .aspx pages as part of a Sharepoint 2010 Feature. What is the best way to do this?

If you are talking about application pages then best way to do it is just add a mapped folder to the Layouts directory in your SharePoint project by right clicking on the project and selecting Add -> SharePoint Mapped Folder.

Create a folder for your application under Layouts and add your aspx to this folder. Your aspx will automatically get deployed with your solution.

another option is to add the page via a module. try this example: http://blog.beckybertram.com/Lists/Posts/Post.aspx?ID=71

the advantage of this option is, you can use a custom site-template and install your own webparts on the new page

<Module Name="Pages" Url=""  Path=""  >
<File Path="Pages\Print.aspx" Url="Print.aspx" Type="Ghostable" NavBarHome="True" />
</Module>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM