CHUVASH.eu
  • About
  • Search
X GitHub
Create your own search box
Posts

Create your own search box

Anatoly Mironov

October 5, 2011

It is very simple. Create a new module: SearchArea. Delete Sample.txt and Elements.xml. Create a new file: SearchArea.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
      Id="ContosoSearchAreaBox"
      Sequence="15"
      ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" 
      ControlAssembly="Microsoft.Office.Server.Search, Version=14.0.0.0, 
			Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="GoImageUrl">/\_layouts/images/Contoso/searchbutton.png</Property>
    <Property Name="GoImageUrlRTL">/\_layouts/images/Contoso/searchbutton.png</Property>
    <Property Name="GoImageActiveUrl">/\_layouts/images/Contoso/searchbutton.png</Property>
    <Property Name="GoImageActiveUrlRTL">/\_layouts/images/Contoso/searchbutton.png</Property>
    <Property Name="DropDownMode">HideDD\_useDefaultScope</Property>
    <Property Name="FrameType">None</Property>
    <Property Name="UseSiteDefaults">false</Property>
  </Control>
</Elements>

Next add your searcharea module to a site scoped feature.

In the masterpage locate this:

<SharePoint:DelegateControl runat="server" 
       ControlId="SmallSearchInputBox" Version="4" />

and replace with your brand new search area:

<SharePoint:DelegateControl runat="server" 
       ControlId="ContosoSearchInputBox" Version="4" />

Now you have full control over the appearence and behavior of the search button. Create your own search button, or google it, style the input with css and add javascript if needed.

  • Masterpage
  • Search
  • Uncategorized

Related

  • Create own delegate control
  • Custom favicon
  • Videokurs om Web Content Management
  • masterpage i application page
  • favicon
  • Link to Home on Top Navigation Bar
  • Format with xslt
  • Add local admin in cmd
  • Check if a file exists
  • Todolist in VS
  • Resize image with jQuery to fit the div
  • ListUrl on EventReceiver
  • Change CA port number
  • Add jQuery as a module
  • SiteLogoImage to RootWeb
© CHUVASH.eu 2026
X GitHub