SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

Were i dislay the title and date are a Gridview when pressing the title that uniqueid shows and the information are displayed, but also just to that UniqueId that i display i want to add Nickname and comments (Userinput) and save back to the list there i have the columns nickname and comments enter image description here

enter image description here

share|improve this question

Have you tried committing the changes back to SharePoint?

itemToUpdate["Nickname"] = TextBoxName.Text;
itemToUpdate["_Comments"] = TextBoxComment.Text;


It's hard for me to make out what you're asking here.

If you're trying to query against the SPListItem.UniqueId, it's a Guid, not an int.

query.Query = "<Where>" +
                "<Eq>" +
                  "<FieldRef Name='UniqueId'/>" +
                  "<Value Type='Guid'>" + theUniqueId + "</Value>" +
                "</Eq>" +

Also, those extra gators ("<" + listItemId + "/>") in your query will cause the query to fail to parse.

share|improve this answer
@ rjcup3 that not the problem i dont know how to use spsitedataquery to get items by id , – Batistuta Feb 13 '13 at 18:01
I edited my answer to address this. – RJ Cuthbertson Feb 13 '13 at 18:18
@jcup3 okej , but do spsitedataquery support splistitem? – Batistuta Feb 13 '13 at 18:40
It's for queries against multiple lists. If you're only querying one list, just use SPQuery. – RJ Cuthbertson Feb 13 '13 at 18:45

Your Answer


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.