title: How do I add a code-behind to a Sharepoint 2010 master page?
body: <p>As part of our branding of Sharepoint 2010, we'll be modifying some custom HTML menu's based on database and user permissions.</p>
  
  <p>To do this, we are looking at the use of code-behind in a custom Sharepoint 2010 master page.</p>
  
  <p>The only reference I can find to creating a code-behind file for sharepoint 2010 is <a href="http://rburgundy.spaces.live.com/blog/cns!5720AE3D366A14DA!846.entry" rel="nofollow noreferrer">this blog post series</a>. The issue I have with this is that it's using the Visual Studio 2010 Sharepoint integration, which has the <em>genius</em> feature of requiring a local instance of an entire Sharepoint site. This isn't something that I can do/get.</p>
  
  <p>This is the <a href="http://msdn.microsoft.com/en-us/library/bb986729.aspx" rel="nofollow noreferrer">MSDN</a> for code-behind master pages in Sharepoint 2007. I'm assuming it's similar but I can't find anywhere that describes it as such.</p>
  
  <p>Is deploying a code-behind for a custom master page the same as in Sharepoint 2007 or does anyone have any experience doing this?</p>