Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

C# to get a list item lookup value

$
0
0

I just recognized that I always deal with lookup column in the customized .net form. This is the first time I have to deal with the lookup column in a SharePoint list. I have tried the following and it did not work, no error but took forever a long time…

SPFieldLookupValue contractor =newSPFieldLookupValue(Convert.ToString(cItem["VendorType"]));

string VT = contractor.LookupValue;

The same thing happen when I did

string VT = cItem["VendorType"].ToString();

I need help on how to get the “VendorType” value, not just the ID.

Many thanks


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>