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 ....
4 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.

- 1,318
- 1
- 11
- 18
-
1hey man thanks a lot, this works good so far. but what if i want the "outer sharepoint skin" to appear around the page i have, like the menu and buttons and this yellow blue skin. is it possible? – Ahmad Farid Jul 15 '09 at 15:31
-
Of course you can; For an example on how to do this, take a look at an existing application page inside that directory, for example settings.aspx ; You will figure out the code and see where and how you have to change (look for the PlaceHolderMain placeholder). – Tudor Olariu Jul 15 '09 at 21:06
-
thx a lot once again, but i tried that and it still doesnt work. it says there is an error. btw what does this stand for? "[full 4-part assembly name]" i also noticed something: in my page, when i write the line of code which defines the master page it says that its not found. but i even opened one of the pages of sharepoint itself and it wasnt there as well. is that normal or what? – Ahmad Farid Jul 16 '09 at 10:00
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.

- 1
- 1

- 59,219
- 41
- 137
- 210
-
1i couldnt do any of that. i dont know is it me who is stupid or what!! but i really got tired of that. i have been searching for 2 weeks. can u just tell me simple steps, i'd be grateful – Ahmad Farid Jul 15 '09 at 14:55
This Visual How To walks you through the process of creating an application page step by step.
Creating an Application Page in Windows SharePoint Services 3.0 http://msdn.microsoft.com/en-ca/library/bb418732.aspx
The presenter of the video, Ted Pattison, has a book that is a great resource to help you get up and started with SharePoint development.
Inside Windows SharePoint Services 3.0 http://www.amazon.com/dp/0735623201?tag=g6consulswebs-20

- 6,744
- 1
- 21
- 26
-
thx rob. i noticed something in the video, when i am in the site features i dont see all those stuff which are found on the video like (a sample feature) which is activated. i dont find except team collaboration links but the others r not. any idea how i can find them? – Ahmad Farid Jul 16 '09 at 11:08
If you want some .aspx-Pages in a SharePoint-Website, you can build a SharePoint-Module Feature containing the .aspx-Pages.
See How to: Provision a File and Create and Use a SharePoint Feature Package

- 2,525
- 7
- 30
- 38
-
i couldnt do any of that. i dont know is it me who is stupid or what!! but i really got tired of that. i have been searching for 2 weeks. can u just tell me simple steps, i'd be grateful – Ahmad Farid Jul 15 '09 at 14:54
-
alright, if a feature is too complex i'd suggest you take the SharePoint-Designer and put that .aspx-pages into the website. And with the SharePoint-Designer you can set the masterpage of the .aspx-pages, etc. – user4531 Jul 15 '09 at 18:09