Monday, October 31, 2011

Custom search and result web part page with quick launch Sharepoint 2010.

I recently faced an issue to create custom site search in a web part page. I solved it using following steps.

NOTE: I did this with SPS2010 Foundation.
  • Create a web part with following code (Remove br tags from code).



  • Then put this web part on a search page.
  • Then create new web part page and open it with SPD.
  • Find asp:content contentplaceholderid="PlaceHolderMain" runat="server" tag.
  • Just below it put this line.(Without curly braces.)
  • Just below your web part zone complete tag in main content place holder put following code.

  • Save file it will prompt for reload click Yes.
  • Check with your custom search and search result pages.