SharePoint DelegateControl – SmallSearchInputBox

Normally shown on the home page for a site, there is a “search box” – that a user can enter a keyword and hit enter.  

There is a ‘prompt text’ that shows, and is cleared when the user clicks on the box.


How do you CHANGE the text being shown !?

Master Page

Within the Master Page – there is a control that is defined as a “DelegateControl” :

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
    <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" Version="4" />

There are actually no properties that you can set – when viewing in SharePoint Designer – I tried !


The problem is that the control is ‘abstracted’ rather than being hard-coded into the master page.   You can thus override the control fairly easily – once you know how of course.

This control is actually a SharePoint feature – called OSearchBasicFeature (and there is an OSearchEnhancedFeature).

If you look into the 14 hive, you’ll find the specific details for the control/s.

  • {SharePointRoot}TEMPLATEFEATURESOSearchBasicFeature
  • {SharePointRoot}TEMPLATEFEATURESOSearchEnhancedFeature

There is a file entitled “SearchArea.xml” which contains the details you need :

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">
        ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.Office.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="GoImageUrl">/_layouts/images/gosearch15.png</Property>
    <Property Name="GoImageUrlRTL">/_layouts/images/gosearchrtl15.png</Property>
    <Property Name="GoImageActiveUrl">/_layouts/images/gosearchhover15.png</Property>
    <Property Name="GoImageActiveUrlRTL">/_layouts/images/gosearchrtlhover15.png</Property>
    <Property Name="DropDownMode">ShowDD</Property>
        <Property Name="SearchResultPageURL">/_layouts/osssearchresults.aspx</Property>
    <Property Name="ScopeDisplayGroupName"></Property>
    <Property Name="FrameType">None</Property>
Create your own (to override)

In order to override these attributes – you need to create a SharePoint feature – with the specific elements you need.

  • Open Visual Studio 2010
  • Create a new “Empty SharePoint project” – call it ChangeSearchTitle (for example)
  • Right-click – and select “Add New Item”
  • Choose the “Empty Element” item – call it ChangeSearchTitle

This will be the framework of your ‘feature’ – just need to paste in the details from the “SearchArea.xml”

  • Within the ELEMENTS.XML file, paste the contents (as above)
  • Add a Property after the “FrameType” :

<Property Name="QueryPromptString">DO A SEARCH !!</Property>

Deploy + Test

That’s ALL you need to do – seriously !

  • Deploy the project from Visual Studio – you might like to change the Feature name – and/or Package.
  • Go to your SharePoint site – and activate the feature – if not already


And – it looks like this…>


Or – for a closer look :


Here’s the exact ELEMENTS.XML I’ve used for this example :

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="">
  <Control  Id="SmallSearchInputBox"
            ControlAssembly="Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="QueryPromptString">DO A SEARCH !!</Property>
    <Property Name="DropDownMode">HideDD_NoScope</Property>
    <Property Name="SearchResultPageURL">/_layouts/osssearchresults.aspx</Property>
    <Property Name="ScopeDisplayGroupName"></Property>
    <Property Name="FrameType">None</Property>


See here for a list of the “properties” you can include in the ELEMENTS.XML :

NB   If you get any of the properties wrong, the search box simply doesn’t show – I had the DropDownMode as “HideDD” – instead of one of these options.

See more here – relates to MOSS 2007 though (12 hive) – thanks guys !!

4 thoughts on “SharePoint DelegateControl – SmallSearchInputBox

  1. Mari February 21, 2013 / 5:34 pm

    fantastic. good blog post, this helped me immensely. thank you.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s