SharePoint 母版页已修改 SPSWC:SearchBoxEx 在每个网站上无法正常工作

发布于 2024-08-17 17:24:20 字数 1217 浏览 1 评论 0原文

我创建了一个自定义母版页,并在页面上包含以下代码:

<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>

在一个站点上,此代码可以正常工作,但在另一个站点上,它不起作用,并且会出现默认搜索框。我不明白为什么会发生这种情况。有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海未深 2024-08-24 17:24:20

contentplaceholder“PlaceHolderSearchArea”中的内容可以被页面布局中的 元素覆盖。因此,请检查您使用的页面布局是否存在占位符 ID“PlaceHolderSearchArea”的

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".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文