SharePoint of the Day #34

If you are working with Lookup columns you can cast the list item values into SPFieldLookupValue objects to retrieve the individual properties:

SPFieldLookupValue value = new SPFieldLookupValue(item["LookupColumn"].ToString());
int lookupID = value.LookupId;
string lookupValue = value.LookupValue;

Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post

Posted under Developer

This post was written by spotd on May 18, 2009

Tags:

Like this tip? Hate it? Vote here

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

What do you think if this tip?

Name (required)

Email (required)

Website

Comments

More Blog Post

Previous Post: SharePoint of the Day #33