sharepoint 2007 - field content type from an SPListItem? -


How do I get field content types (like ImageFieldContent, etc.) from a SPListItem?

Try oItem ["ContentType"] to get the content type of an object. TosString () (where oItem is your SPListItem object)

To obtain the type of columns within a SPListsItem you must loop through the oItem.Fields and receive FieldViewType. E.g.

foreach (SPField offfield in oItem.Fields) {Console.WriteLine (oField.FieldValueType); } Note: Field Value type: Field type has its own value type, returns the value type of the field. To see a complete reference here


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -