Custom refinement webpart - obtain RefinementManager object

Hello,

I am struggling with extending the OOTB refinement webpart. What I want to do is adjusting the XML holding all refinements and values to display the translations of some terms.

I follow the 2010 example found on a blog (Timmy Gilissen). I understand how the person does it in 2010 but in 2013 I am unable to retrieve the RefinementManager object and so I can not get the XML (RefinementManager.GetRefinementXml()).

I already tried inheriting from Microsoft.Office.Server.Search.WebControls.RefinementWebPart and Microsoft.Office.Server.Search.WebControls.RefinementScriptWebPart.

Can anyone please point me out the right direction please?

Thanks a lot!

June 24th, 2015 8:00am

I have been searching and searching but I can not find a solution. Please, can anyone explain why I can not get the RefinementManager on my results page??

RefinementManager refManager = RefinementManager.GetInstance(this.Page);

Does not work...

Free Windows Admin Tool Kit Click here and download it now
June 24th, 2015 9:21am

Hi,

I create a Visual Web Part and get the RefinementManager object in the Page_Load method like this:

protected void Page_Load(object sender, EventArgs e)
{
    RefinementManager _manager = RefinementManager.GetInstance(this.Page);
    string s = _manager.DisplayCulture.DisplayName;
    this.Label1.Text = s;
}

I would suggest you debug your code to see if there is any exception when calling the RefinementManager.GetInstance(this.Page) method.    

Thanks 

Patrick Liang

June 25th, 2015 3:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics