Question

I have created custom master page with custom elements included according to this link: http://msdn.microsoft.com/en-us/library/gg447066.aspx

I want to have a Suggestions form in header area where users can leave their comments/suggestions on what functionality they would like to have.

For example:

  • User goes to company team site and notes that it would be great to have a clock on it

  • User fills the Suggestions form and the suggestion is emailed to me

  • Now I decide will I implement/develop it or not

I have placed all html elements and now I need code implementation. My question is: "How to code html elements to achieve desired functionality?".

Tried to follow up through this solution to add code behind masterpage: http://rburgundy.wordpress.com/2010/03/10/sharepoint-2010-custom-masterpage-with-code-behind-file-%E2%80%93-part-2/ but I get an error which I don't know how to handle. Here is the error:

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:

I need to implement _starter.cs file as code-behind masterpage.

Was it helpful?

Solution

Don't bother with webparts in your master page.

Delegate control is your friend.

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/

You can write your delegate control to be full postback or Ajax, implementation is up to you.

Personally, having webparts in masterpage is a no-no for me, that's what page layouts are for. In masterpage, delegate control is THE prefered method to have custom html/code rendering.

OTHER TIPS

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

Something like this within a web part and then add a web part to your master page.

Hope this helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top