I need to create tasks in a SharePoint Task List with c#.
Can I use SharePoint API like SPList.Items.Add() ? I will not be monitoring the task changes after creation. Or Should I consider using Outlook API?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You got it right the first time.
Use the SharePoint object model. It’s pretty easy to work with and reasonably intuitive. The only things you need to watch our for are populating the fields (check they exist first as SharePoint is customisable and someone could delete or rename a field), and when you’ve created the SPWeb and SPSite objects, be sure to dispose() of them afterwards.