views:

38

answers:

1

Heh guys,

I would like to create and deploy an ASP.NET web form on SharePoint server which can create document in SharePoint list (or library). Since I'm not experienced in both these technologies so would appreciate if someone guides me to the right tool. Should I use Visual Studio or SharePoint designer ? Also, I was reading an article on MSDN about "Deploying ASP.NET Web Applications in the Windows SharePoint Services 3.0 _layouts Folder". Is it the best practise or should I go with webpart/solution based deployment?

Rishi

A: 

Based on your need, custom ListItemEventReceiver is the recommended solution.

If you are going to need an UI & reuse it in some other page, then WebPart is the way to go. Custom application page is the least preferred approach here.

An example here: http://blah.winsmarts.com/2006-7-Sharepoint_2007__List_Events_Practical_Example__Creating_a_rigged_survey.aspx

stackunderflow
Thanks stackunderflow, Can you guide me with example where event receiver used in visual studio from scratch. The article you have mentioned is having chunk of code, I don't know how to try it at my end.
Rishi
If you are using VS 2010, Create a new SharePoint Empty Project, add an EventReceiver. Select list instance to associate the receiver in development. Select events to handle such as Item Added. Open the event receiver code and uncomment method OnItemAdded and add your custom logic there.
stackunderflow