简体   繁体   中英

SharePoint Master Page modified SPSWC:SearchBoxEx not working correctly on each site

I have created a custom master page and have the follwoing code on the page:

<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
                            <SPSWC:SearchBoxEx id="SearchBox" 
                                RegisterStyles="false" 
                                TextBeforeDropDown="" 
                                TextBeforeTextBox="Search" 
                                TextBoxWidth="120" 
                                GoImageUrl="/_layouts/images/gosearch.png"
                                GoImageUrlRTL="/_layouts/images/gosearch.png" 
                                UseSiteDefaults="true" 
                                DropDownMode = "HideScopeDD" 
                                SuppressWebPartChrome="true" 
                                runat="server" 
                                WebPart="true" 
                                __WebPartId="{07E563F9-A259-4829-920F-03829BBC14D1}"
                                GoImageActiveUrl="/_layouts/images/gosearch.png" 
                                GoImageActiveUrlRTL="/_layouts/images/gosearch.png"/>    

</asp:ContentPlaceHolder>

On one site this code works correctly and on another it does not work and the default search box apears. I can not work out why this is happening. Any ideas?

The content in the contentplaceholder "PlaceHolderSearchArea" can be overwritten by a <asp:Content /> element in a page layout. So check the page layouts you are using for the existance of an <asp:Content/> with the placeholder id "PlaceHolderSearchArea".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM