将 SharePoint 2010 中的默认搜索框替换为自定义搜索框
在每个新的 SharePoint 2010 网站上,您都会获得默认搜索框(在 MasterPage 中),该框允许您执行普通搜索。
我想用一些允许您选择“高级”或“人物搜索”的项目替换它,就像这样......
是否可以替换/更改母版页中的默认搜索框?
On every new SharePoint 2010 site you get the default search box (In the MasterPage) that allows you to just do a normal search.
I would like to replace this with some item that will allow you to pick Advanced or People Search, something like this.........
Is it possible to replace/alter the default search box in the MasterPage?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
搜索框是一个所谓的委托控件,因此自定义起来并不容易,因为您必须用自己的控件覆盖该控件才能更改它。您可以为搜索框激活一些高级设置(
ShowAdvancedSearch
属性),但仅此而已。关于您的问题:是的,可以替换默认搜索框,但您必须编写自己的搜索框。您应该尝试用谷歌搜索“SmallSearchInputBox”。这里有一些文章可以帮助您入门:
The search box is a so called delegate control, so it is not that easy to customize as you would have to overwrite the control with your own to change it. There are some advanced settings (
ShowAdvancedSearch
property) you can activate for the search box, but that's about it.So about your question: Yes it is possible to replace the default search box, but you would have to write your own searchbox then. You should try googling for "SmallSearchInputBox". Here some articles to get you started: