0

I have a couple of page layouts and my MasterPage.

My portal has 4 main areas and the way items in the header appear depend on which area the user is (imagine like tabs). This is not the only situation for this behavior in my masterpage.

If this was a asp.net project, I would create the behavior in my masterpage but I'm not seeing any samples on how to do it in SP.

How can I embed "usercontrols" or "code behind" in my SP MasterPage to accomplish a simple thing to do in a simple .Net Project?

Note: I'm creating a branding solution (WSP) in VisualStudio 2012.

1

I would add some delegate controls in your masterpage and then create some user controls that fill in the content for that delegate control. Then you can create some features that turn on or turn off what user control is being used in the delegate control. This also enables some code behind in your user controls.

See this link for more information. http://msdn.microsoft.com/en-us/library/office/ms463169(v=office.14).aspx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.