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.
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();
Tasklist. I will post some code up later today.