The small search control that is rendered in the default SharePoint pages is a delegate control rendered through master page. You can find it defined in the master page as follows:
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
This control is actually available through a feature called "OSearchBasicFeature" located under 12\TEMPLATE\FEATURES. In the feature elements file (in this feature it's called "SearchArea.xml"), you can see the following:
ControlAssembly="Microsoft.SharePoint.Portal, Version=126.96.36.199, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
The main class here seems to be Microsoft.SharePoint.Portal.WebControls.SearchBoxEx. To customize small search, you need to inherit from "SearchBoxEx" class and override "CreateChildControls" method to get your custom small search rendered. Do not modify any out of the box files as they might lead you into an unsupported scenario. Instead, following are the simple steps to get the small search control customized:
This should do the tricky and you should be able to literally customizing anything within the small search control.
Happy customizing your SharePoint environment - and I really hope this post was helpful! Look around for things like this in SharePoint as there are plenty of "hacks" to get things done!!!
PingBack from http://wordnew.acne-reveiw.info/?p=1351
A well written primer on this interesting topic. Thanks you.
Is it possible to provide some sample code here? I'm very interested in customizing the rendering of the small search control.
I desperately need to make the 2 search boxes stack on top of one another. I really just need a little <br/> between them.
If you can show me this I'll send you $5 donation via Pay Pal.
I will contribute another $15 to Flannel's $5 offer to bring the total to $20.
Sridhar, can you show us how to stack the search boxes please?
I wont to do the DDL not visible. but to let the scope to All site by default because i use the facets serach.
how i can do this?
I'd tried your method but i couldn't understand your step 5, on how to change the control and assembly.
Hi Sridhar, excellent post. can you please give us a detailed process involved in each step.. thanks a lot.
Apparently, people are saying good post but all seems to be still confused.
I want to customize the small search control into two rows. I was searching a few hours through the web with no really helpful results.
Can anybody help how i can dissolve the two rows problem?
Really nice artical, help me alot, May you be guided.