I'm trying to extend the CoreResultsWebPart in order to render search results in a custom fashion. I know that I could use the XSL in order to customize the results but given the need to perform some lookup's against other data sources the XSL isn't sufficient.
It seems like doing:
protected override void RenderContents(HtmlTextWriter writer) {
// code
}
Should work, but anything I put in this function doesn't seem to have any impact on the web part. If I override the Render method that seems to work, but my understanding is the Render method breaks the WebPart object model so you really shouldn't use it.
I've also tried CreateChildControls but this seems to be called much earlier in the stack before the KeywordQuery is executed so the search results aren't available at the time CreateChildControls executes.
I'm getting the search result data by overriding the GetXNavigator method, which seems to work fairly well but I'm not sure if there is a better way.
Any ideas or suggestions for overriding the CoreResultsWebPart in this way?