Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add custom ASP.NET pages into sharepoint

How to add custom ASP.NET pages into sharepoint? I am very new to sharepoint but what I realized is that I can only make plain text pages or links. but what if I have a website already built in ASP.NET and want to add it through sharepoint. Or is it possible to build the website itself from sharepoint including dynamic server side controls like buttons, trees ....

like image 726
Ahmad Farid Avatar asked Jul 15 '09 12:07

Ahmad Farid


People also ask

How do I add a custom ASPX page to SharePoint?

1) Click on Site Contents from the site where you want to add your web part page. 2) Click on Site Pages document library. 3) On the Site Pages document library click Files tab in the Ribbon and click New Document --> Web Part Page. 4) Enter the name of the ASPX page and pick the layout.

Can you use C# with SharePoint?

You can develop SharePoint projects by using either Visual Basic or Visual C#, and you can develop app for SharePoint projects by using JavaScript.


2 Answers

Simple answer: put your *.aspx files in inside the _layouts folder, usually located at

c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\

afterwards you can access you page (named page1.aspx for example) through the sharepoint site by: http://your site name/_layouts/page1.aspx

You can have inline code and/or code-behind, just like in a normal aspx page.

However, please note that pages added through this method are called application pages, meaning that they cannot be customized (easily) by the user and are available under all site collections in your farm.

SharePoint supports another kind of pages, called Site Pages which are site-specific, you can read more about them here.

like image 178
Tudor Olariu Avatar answered Sep 28 '22 18:09

Tudor Olariu


See these questions which should cover everything you need:

  • How would you convert an ASP.NET site to work as a SharePoint site?
  • Moving from custom ASP.NET application to Sharepoint Services
  • Deploying custom Asp.net applications to same IIS site as Sharepoint
  • SharePoint - ASP.Net Controls Integration
  • Sharepoint controls in ASP.NET application

Also this page on SharePoint Dev Wiki.

like image 30
Alex Angas Avatar answered Sep 28 '22 17:09

Alex Angas