I have a list with a taxonomy column.

I have made SPMetal classes to work with my site.

But SPMetal doesn't create the property for taxonomy column, so I have extended my class by the ICustomMapping interface:

    public TaxonomyFieldValue Branch
        get { return _branch; }
            if ((value == _branch))

            this.OnPropertyChanging("Branch", _branch);
            _branch = value;

Now I have the following problem: I need to insert a new item on my list and I would like to use SPMetal:

        RequestItem newRequest = new RequestItem
                                          Branch = taxonomyField,
                                          CompanyEmailAddress = txtCompanyEmail.Text,
                                          Name = txtName.Text,
                                          Phone = txtPhone.Text,
                                          RequestType = RequestType.Entry,
                                          Status = Status.SUBMITTED,
                                          Surname = txtSurname.Text,
                                          //UserIdId = usr.ID,

the value for "taxonomyField" comes from the form and I don't know how can I get it from the TaxonomyWebTaggingControl.

1 Answer 1


The TaxonomyWebTaggingControl has a property Text. This will return the value in the format Label|Guid. To get the label, the code will be like this (from the top of my head)

TaxonomyFieldValueCollection tagValues = new TaxonomyFieldValueCollection();
string labelValue=tagValues[0].Label;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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