Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To change the default search scope you don't need to create a delegate control. This can be done by selecting <strong>Site Actions > Site Settings > Site Collection Administration | Search scopes</strong>, and clicking on the "<strong>Display Group: Search Dropdown</strong>" link (note this can take a few minutes to take effect). </p> <p>If you want to override other properties on the default control you can use a delegate control similar to the one below in your feature:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;Control Id="SmallSearchInputBox" Sequence="25" ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx" ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"&gt; &lt;Property Name="GoImageUrl"&gt;/_layouts/1033/images/myapp/go-btn.gif&lt;/Property&gt; &lt;Property Name="GoImageUrlRTL"&gt;/_layouts/1033/images/myapp/go-btn.gif&lt;/Property&gt; &lt;Property Name="GoImageActiveUrl"&gt;/_layouts/1033/images/myapp/go-btn-hover.gif&lt;/Property&gt; &lt;Property Name="GoImageActiveUrlRTL"&gt;/_layouts/1033/images/myapp/go-btn-hover.gif&lt;/Property&gt; &lt;Property Name="QueryPromptString"&gt;Enter search query here&lt;/Property&gt; &lt;Property Name="UseSiteDefaults"&gt;true&lt;/Property&gt; &lt;Property Name="FrameType"&gt;None&lt;/Property&gt; &lt;Property Name="ShowAdvancedSearch"&gt;false&lt;/Property&gt; &lt;Property Name="DropDownMode"&gt;HideScopeDD&lt;/Property&gt; &lt;Property Name="TextBoxWidth"&gt;200&lt;/Property&gt; &lt;Property Name="CssClass"&gt;headersearch&lt;/Property&gt; &lt;/Control&gt; &lt;/Elements&gt; </code></pre> <p>See <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.portal.webcontrols.searchboxex_members.aspx" rel="nofollow noreferrer" title="SearchBoxEx Members on MSDN">SearchBoxEx Members on MSDN</a> for more information on the properties available.</p> <p>If that doesn't do what you need then you can place a custom control in the %Program Files%\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES directory and load it using a feature similar to the one below:</p> <pre><code>&lt;Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt; &lt;Control Id="SmallSearchInputBox" Sequence="25" ControlSrc="~/_ControlTemplates/MySearchControl.ascx"/&gt; &lt;/Elements&gt; </code></pre> <p>Note you must also ensure that your masterpage has the appropriate delegate control tag:</p> <pre><code>&lt;SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox"/&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload