Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to create Polling app. For that i want to learn about survey list. That can I add update delete survey list data Programmatically.? First of all i want to create a web part which perform this but I am not able to find any logic according to this on google.

I am trying to search web part which lets me know how to manipulate Survey List?

share|improve this question

1 Answer 1

surveys are just another type of lists, you insert items the same way you do it with normal lists

Here is sample code for manipulate list

SPList list = web.Lists["My survey"];
web.AllowUnsafeUpdates =true;
SPListItem item = list.Items.Add();
item["This is my question number 1"] = "this is the answer";
item.Update();
web.AllowUnsafeUpdates =false;

Hope this helps

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.