SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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;
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.