Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom webpart to add an item to the product list, i need a way to add tags to the item catagory column in the list (programmatically).

How do I do it !

share|improve this question

2 Answers 2

Take a look at these scripts on TechNet. The script starting with 5 is updating the Item Category column.

share|improve this answer
up vote 2 down vote accepted

i figured out a way to do this TaxonomyFieldValueCollection TagsCat = new TaxonomyFieldValueCollection(String.Empty); TagsCat.PopulateFromLabelGuidPairs(TaxonomyWebTaggingControl1.Text);

                            var taxKeywordField = oSpListItem.Fields.GetField("ProductCatalogItemCategory") as TaxonomyField;
                            taxKeywordField.CreateValuesInEditForm = true;
                                taxKeywordField.ParseAndSetValue(oSpListItem, TagsCat[0].TermGuid);
                            catch (Exception e2)


This worked for me

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.