c# Insert/Update multiple lookup values to an SPListItem

Madhu Landh Chodh picture Madhu Landh Chodh · Feb 28, 2011 · Viewed 7.8k times · Source

sharepoint allows multiple items to be added for a lookup column type. Is there a good article that has the code snippet to update or add lookup values?

Answer

Vladi Gubler picture Vladi Gubler · Feb 28, 2011

Take a look at this object SPFieldLookupValueCollection. What you need to do is to create an instance of this class, fill the collection with SPFieldLookupValue objects and assign the collection to the field, that's it.

http://social.msdn.microsoft.com/Forums/en/sharepointdevelopment/thread/02c889fc-6b15-4a60-b0f6-ed5d020ec6c2