1

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>
                <Eq>
                   <FieldRef Name='Title' />
                   <Value Type='Text'>objdocument.title</Value>
                </Eq>
              </Where>"
});

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

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

1 Answer 1

3

Update this

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

Your Answer

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

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