sharepoint - Retrieve content type columns values in C# -



sharepoint - Retrieve content type columns values in C# -

i have document library content type multiple columns in sharepoint2010. retrieve values in column using next code fails.

objcurrentweb = spcontext.current.web; objlist = objcurrentweb.lists["mynewlists"]; foreach (splistitem objlistitem in objlist.items) { id = (objlistitem["applicationid"]).tostring(); }

how retrieve values in content type columns correctly?

thank you!

it can fail in 2 cases: 1) there no such field "applicationid". ensure utilize field internal name 2) (objlistitem["applicationid"]) null, fails nullreferenceexception on casting string.

c# sharepoint sharepoint-2010 content-type document-library

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -