Hi
I am trying to get Meta data information of an item (document) exists in document library.
At the time when I update this item, I put some additional information in hash table with this item programmatically. using the below code
SPFolder target = oSpWeb1.GetFolder(doclibraryname);
SPFileCollection files = target.Files;
Hashtable ht = newHashtable();
ht.Add("testcol","myfile");
target.Files.Add(oItem.File.Name, _docbytes , ht , true);
I have two questions,
1. Is that the right way to set Meta information against an item.
2. How to get this Meta Information programatically.
I am trying to get it from below code, but it does not work it returns exception.
object fieldValue = spfile.Item["testcol"];
Any help will be highly appreciated.
Thanks
Saad