//
// Returns the Single Value of a Lookup Field.
//
private static string GetFieldValueLookup(this SPListItem item, string fieldName)
{
if (item != null)
{
SPFieldLookupValue lookupValue = new SPFieldLookupValue(item[fieldName] as string);
return lookupValue.LookupValue;
}
else
{
return string.Empty;
}
}
Example:
// Reads the value of a SPFieldLookup field
string value = item.GetFieldValueLookup("LookupFieldName");