2012-10-11 35 views
2

我已创建自定义主与自定义元素根据这个链接包含的页面:http://msdn.microsoft.com/en-us/library/gg447066.aspx如何将代码添加到SharePoint 2010的主

我想有一个建议,标题区组成,用户可以留下自己的意见/建议他们想要什么功能。

例如:

  • 用户进入公司团队网站,并指出,这将是巨大的,有它的时钟

  • 用户填写建议表单和建议通过电子邮件发送给我

  • 现在我决定,我将实现/开发与否

我已经放置了所有html元素,现在我需要代码实现。我的问题是:“如何编码html元素以实现所需的功能?”。

试图通过此解决方案后续追加主代码后面的代码:http://rburgundy.wordpress.com/2010/03/10/sharepoint-2010-custom-masterpage-with-code-behind-file-%E2%80%93-part-2/ 但我得到一个错误,我不知道如何处理。 以下是错误:

Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load the assembly 'Branding102, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84d1d0117dd4046d'. Make sure that it is compiled before accessing the page. Source Error: Line 1:

我需要实现_starter.cs文件代码隐藏母版。

回答

1

不要打扰您的母版页的webparts。

委托控制是你的朋友。

http://msdn.microsoft.com/en-us/library/ff650763.aspx

http://fyeomans.com/2011/05/16/make-your-sharepoint-2010-master-page-extensible-with-delegate-controls/

你可以写你的委托控制是完全回发或阿贾克斯,实现由你。

就个人而言,在主页中使用webparts对我来说是一个禁忌,这就是页面布局的目的。在masterpage中,委托控制是自定义HTML /代码渲染的首选方法。

+0

最后我设法专注于我的SharePoint问题。你是对的,委托控制是我的朋友,从现在开始。日Thnx! –

0

http://edwin.vriethoff.net/2007/10/02/how-to-send-an-e-mail-with-attachment-from-sharepoint/

事情是这样的一个Web部件内,然后Web部件添加到您的母版页。

希望这有助于

+0

我不希望用户打扰webparts。我有一堆网站,并在每个网站上启用webparts不是解决方案。我希望将建议表单放置在SP用户名旁边的标题区域中。 –

+0

我很确定您可以在根级别安装Web部件,将其添加到主页面。然后这应该通过使用这个母版页在所有网站上分发。本质上你只添加一次Web部件,用户没有选择,只能接受它在那里 – Truezplaya

相关问题