I have a taxonomywebtagging control provided in sharepoint 2013.
I'm using this control on an application page where there are other controls and a submit button. Requirement is that when I submit the values, it is stored in viewstate and then it goes into next tab on the page.
User can click on back button to go to the previous tab and they should see the entered value in taxonomywebtagging control.
I have written a extension method to populate the taxonomyWebTagging Control. But the main thing is that when page postback is taking place then below piece of code even after executing is not showing the value.
Also the ViewState variable has the value in the form of Label|ID
_countryName = Convert.ToString(ViewState["_country"]);
if (IsPostBack & !string.IsNullOrEmpty(_countryName))
{
TaxonomyControl.Text = _countryName;
}
Full code is :
protected void Page_Load(object sender, EventArgs e){
multiViewCtl.ActiveViewIndex = 0;
bool configured = TaggingControlHelper.ConfigureWebTaggingControl(TaxonomyControl, "Managed Metadata Proxy Service/Test Group/Country");
if (!configured)
{
throw new ApplicationException("Unable to find target TermSet");
}
_countryName = Convert.ToString(ViewState["_country"]);
if (IsPostBack & !string.IsNullOrEmpty(_countryName))
{
TaxonomyControl.Text = _countryName;
}
}
Please suggest how to show the value in the control on page postback?
Thanks & Regards, Soumyadev | Posting is provided "AS IS" with no warranties, and confers no rights.