SPListItem listItem = list.Items.Add(listRootFolder.ServerRelativeUrl, SPFileSystemObjectType.File, null);
listItem["Owner"] = spUser; <-- if you step through the code while debugging, an argument exception may occur here
listItem["Url"] = url;
listItem["Title"] = title;
listItem.Update();
In case of an argument exception, you have to check if the assigned spUser-object has been opened from the same parent web as the list.
Keine Kommentare:
Kommentar veröffentlichen