I have used server object model to update list item based on title field and used below code

SPList list = web.Lists["ListName"];

SPListItemCollection items = list.GetItems(new SPQuery()
    Query = @"<Where>
                   <FieldRef Name='Title' />
                   <Value Type='Text'>objdocument.title</Value>

foreach (SPListItem item in items)
    item["Properties"] = objdocument.empID + objdocument.proID 

I have debug the code and debugger is not entering in foreach loop. Can anyone please help

1 Answer 1


Update this

<Value Type='Text'>" + objdocument.Title + "</Value>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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