views:

454

answers:

6

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

+2  A: 

See these questions which should cover everything you need:

Also this page on SharePoint Dev Wiki.

Alex Angas
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
A: 

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

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
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.
A: 

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.

Tudor Olariu
hey 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
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
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
A: 

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

Rob Windsor
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
A: 

Sorry to say this, but you are asking us to do the coding FOR you basically, seeing the comments you added:

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

Although this site is here to help, we are not going to do that. (at least I'm not).

IMHO, digging around how to do new things you come across (CHALLENGES!) is what makes programming so much fun.

You do know ASP.NET so to see, but I guess you lack the will to get into SharePoint and it's Feature / Solution based deployment Framework.

Alex's links are excellent reading material, I suggest you try again, it really isn't that hard.

Colin
first of all i didnt ask for coding. i said STEPS, u just gotta read well. like the answer of "Tudor Olariu" does it looks to u that he has written any code?second, if u dont like the questions u can simply ignore it and save ur effort and time :)
Ahmad Farid
It's not the question that bugs me, it's the comments of "I couldn't do that, i got really tired of that". Follow the links in Alex's answer and try again (and again and again)
Colin
i did exactly whats in thathttp://msdn.microsoft.com/en-us/library/cc297200.aspxbut it still doesnt open. it says "unknown error"
Ahmad Farid
Could you dig around in the Sharepoint logs and then post the error here? The default location is in SharePoint's 12 hive folder, the LOGS folder. Furthermore, are the dll's your pages rely on in the Global Assembly cache?
Colin
ok now the sample page worked. thx for ur support and willing to help. but now i am trying to add my own controls but they r not working. here is the last line at the log file07/17/2009 11:45:10.68 mssdmn.exe (0x1198) 0x1308 Search Server Common PHSts 0 Monitorable ****** Server kermit:44054 security initialization failed, hr = 80041200 - File:d:\office\source\search\search\gather\protocols\sts3\sts3util.cxx Line:318
Ahmad Farid
i discovered something new.when i declare an object of a class i wrote by myself it doesnt work. when i comment this line it works.although the class is found at the app_code folder and its normally written and autocomplete is working!!
Ahmad Farid
A: 

Using Smart Part

Ahmad Farid