I am using the object model to loop through the items in the built in "Task" list. For some reason when I get the value for the "Title" field for each item it returns values like 1_.000, 2_.000 etc. instead of returning the title that is displayed by the default view.

Do I need to do something special to get the actual title rather than these strange values?

P.S. I checked which columns are being displayed in the default view and there are three versions of Title in there: "Title", "Title (linked to item with edit menu)" and "Title (linked to item) ". I tried using each one but still get the weird values.

  • 1
    Can you list the code? Does it behave the same against other list types?
    – SHug
    May 3, 2011 at 15:25
  • It just happens for the Task list. I will post some code up later today. May 3, 2011 at 17:26
  • This isn't in a meeting workspace, is it?
    – James Love
    May 3, 2011 at 18:31
  • Your days are looong... ;)
    – Stu Pegg
    May 25, 2011 at 18:03
  • did you ever find the answer to your question?
    – Kit Menke
    Jun 16, 2011 at 16:53

2 Answers 2


Are you using SPListItem.Title?

You might want to just try:

SPListItem item; // get the item from somewhere
string title = item["Title"].ToString();
  • No i'm not using SPLIstItem.Title. I am using the method you suggested. May 3, 2011 at 17:26
  • We need your code! :) Just tried on my Tasks list, and I'm getting right title value from both item.Title and item["Title"].ToString() May 3, 2011 at 17:36

I just tested this with a OOB Task list and it worked fine with the code below.

public static void TestOneFuncOne()
    using (SPSite site = new SPSite("http://siteurl"))
        using (SPWeb web = site.OpenWeb())
            SPList list = web.Lists["Tasks"];
            SPListItemCollection items = list.Items;
            foreach (SPItem item in items)
                String title = item["Title"].ToString();

Have you read about how SharePoint the reference to version URL SPListItemVersion.Url Property?

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.