2012-10-11 32 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

相關問題