Hi,
I have created taxonomy control in custom aspx page and I am able to select terms but I am trying to setup default value to that control.
Can anybody let me know how to set the default value for TaxonomyWebTagging control in custom.aspx page with nested terms?
Any help would be greatly apprecited.
Control code in aspx page:
Thank you.<td><asp:Label runat="server" ID="lblLanguages">Field A: </asp:Label><asp:Label runat="server" ID="rfvlblLanguages" CssClass="errorMsg" ForeColor="Red">*</asp:Label></td><td><Taxonomy:TaxonomyWebTaggingControl ID="term" Width="385px" runat="server" />
</td>
Mapping metedata code:
TaxonomySession session = new TaxonomySession(SPContext.Current.Site); //Set the Business Unit Field SPSite site = SPContext.Current.Web.Site; TermStore termStore = session.TermStores["Managed Metadata Service"]; Group group = termStore.Groups["GROUPName"]; TermSet termSet = group.TermSets["TERMSETNAME"]; Term term = termSet.Terms["TermA"]; Guid termGuid = term.Id; term.SspId.Add(termStore.Id); term.TermSetId.Add(termSet.Id); term.AllowFillIn = true; term.AnchorId = countryGuid; term.IsMulti = true;
AA.