Tuesday, October 22, 2013

TaxonomyWebTaggingControl is not rendering properly (WebTaggingUI.css not added)

Recently, I faced a small issue with rendering the TaxonomyWebTaggingControl. It works but the display was really weird. I figured that it would be a css not being added properly to the page. I found the respective css file to be added to the page (WebTaggingUI.css). But I was not sure what control needs to be added to include that css file to the page.

After a little bit of research and playing with my master page and page layouts, I found that the CssLink control is responsible for including required css files to the pages. I have added a new CssLink  (Microsoft.SharePoint.WebControls.CssLink) (shown below) control to the master page and everything magically looks to work fine.

CssLink control added to master page:
    <SharePoint:CssLink ID="CssLink1" runat="server" Version="4" />

TaxonomyWebTaggingControl before the css link added: 


After adding css link control:

Happy Coding.
Senthil S