Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Custom Search Page

Above image is my .net Search page. Here I have used SQL Server Database for fetching result.

I want to convert my .net site to SharePoint 2010 Site and Using custom database I want to display result as below Image. (As Similar as SharePoint Advance Search and Advance Search Result Page)

enter image description here

Can Anyone guide me how to create Custom Search Web Parts Using Visual Studio 2010

Thanks in Advance.

share|improve this question

3 Answers 3

If your SharePoint page has search results web parts already on it (like Core Results, Refinements Panel, etc., all out of the box stuff), you can trigger a search by just visiting the page and using the querystring k=<your search query>.

So, you can create a standard Visual Web Part in Visual studio with the controls you need on it, and the button to start the search can just go to the current page and append on k= in the querystring, and include your search. You'll need to append other search parameters into the querystring as per your selections in your other controls. So taking your Award example above, you could do a query in the text box that would append the following to the querystring:

?k=Some Search AND 'Award Notice'

If the data you want to search is stored in SQL, you will need to surface it in SharePoint via External Content Types first, so that SharePoint Search can crawl and index it. Here's an article on MSDN on how to do exactly this: http://msdn.microsoft.com/en-us/library/ee557243(v=office.14).aspx

share|improve this answer
    
Hi James, Thanks for your help, Please can you give me some url of example. –  Kapil Dave Jun 6 '13 at 13:15

I found one interesting link,

http://stackoverflow.com/questions/4773077/can-sharepoint-2010-search-in-an-external-customer-database-not-bcs

So I think that its not possible

Appreciate, if someone suggest any possibilities.

share|improve this answer

You can inherit and extend Search web part. You can develop new web part by extending "core search results web part" class.

By doing this you can take the advantage of search web parts and add your custom logic.

You can refer below URL for more details: http://consultingblogs.emc.com/mattlally/archive/2011/12/29/sharepoint-2010-custom-my-search-core-results.aspx

share|improve this answer
    
Hi Jay, Thanks for your help –  Kapil Dave Jun 7 '13 at 8:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.