Sharepoint 网站标题中的自定义 Web 部件

发布于 2024-10-31 13:06:39 字数 343 浏览 0 评论 0原文

我在 SharePoint 2007 中有一些经验,但这是我在 SharePoint 2010 中的第一个项目。 我需要做的是这个,我会尽量说清楚:
1 - 创建一个 Web 部件,该部件将调用通过查询字符串传递一些参数的 Web 应用程序(这很简单),但我有一个问题:在 SharePoint 2010 中,我可以仅使用 SharePoint Designer(无需 Visual Studio)开发一个简单的 Web 部件吗?
2 - 我需要将刚刚创建的 Web 部件放在我的共享点网站的标题中,我认为我应该将其放在我的母版页上,以便 Web 部件将位于我的网站中的任何位置。我可以做这件事吗?怎么办?
感谢您的支持!

麦芽酒

I have some experience in SharePoint 2007, but this is my first project in SharePoint 2010.
What I need to do is this, I will try to be as clear as possible:
1 - Create a web part that will call a web application passing via querystring some parameters (and this is easy), but I have a question: in SharePoint 2010 can I develop a simple web part just with SharePoint Designer (without visual studio)?
2 - I need to put the web part that I have just created in the header of my sharepoint site, I think I should put it on my masterpage so that the web part will be anywhere in my site. Can I do this thing? How?
Thank you for your support!

Ale

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

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

发布评论

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

评论(1

隔岸观火 2024-11-07 13:06:39

如果您正在开发自定义 Web 部件,则应使用 Visual Studio。 SPD(SharePoint Designer)更多地是为了维护现有资产(母版页、页面布局、Web 部件等)而设计的。另外,我认为甚至不可能在 SPD 中创建 100% 自定义 Web 部件:

http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/63428ccd-729d-4d94-8a9b-d284b608929e

当您说“标题“我假设你的意思是“在页面顶部”而不是在 head 标签中。母版页通常不像页面布局那样拥有自己的 Web 部件区域:

http://www.novolocus.com/2008/10/13/so-can-you-put-web-part-zones-in-母版页或内容/

也就是说,您可以将 Web 部件直接放入母版页中(这实际上与将自定义用户控件放入母版页中相同)。如果您的 Web 部件必须位于页面顶部,并且必须位于母版页中,则您可能根本无法使用 Web 部件并创建自定义用户控件(ascx 文件)。然后,您可以将控件放置在母版页的顶部,并且该控件在网站的每个页面上都可用(假设未使用多个母版页)。这样您就根本不需要担心 Web 部件。

If you're developing a custom web part you should use Visual Studio. SPD (SharePoint Designer) is designed more for the maintenance of existing assets (master pages, page layouts, web parts, etc). Plus, I don't think it's even possible to create a 100% custom web part in SPD:

http://social.msdn.microsoft.com/Forums/en/sharepointcustomization/thread/63428ccd-729d-4d94-8a9b-d284b608929e

When you say "header" I assume you mean "at the top of the page" and not in the head tag. Master pages usually do not have their own web part zones like page layouts do:

http://www.novolocus.com/2008/10/13/so-can-you-put-web-part-zones-in-master-pages-or-what/.

That said, you can put a web part directly into a master page (which is effectively the same thing as dropping a custom user control into the master page). If your web part must go toward the top of the page, and must be in the master page, perhaps you could not use a web part at all and create a custom user control (an ascx file). You could then place your control toward the top of the the master page and it would be available on every page of the site (assuming multiple master pages aren't being used). This way you don't need to worry about web parts at all.

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