title: Best Practice with "Code Behind" partial views
body: <p>G'day all. </p>
  
  <p>I'm still new at this MVC thing and am trying to get my head around some design basics. </p>
  
  <p>I have a 'control' (old web forms lingo?) that I want to use on multiple pages. It's a standard log in box, ie, username, password etc with a submit button and code specific to it. </p>
  
  <p>I have created this as a partial view. This renders fine in both of the pages/views where it's used, however my question is where is the best place to put the code that fires when the form (in the partial view) is submitted?</p>
  
  <p>Do I create HTTPPost attributes in both of the 'full' views that then call another class of 'general functions' that has the code specifically related to the partial view? Ideally, I guess that I want a "SharedController" or something that has action methods for things like this, however it all seems that this would get out of hand as the application grows. </p>
  
  <p>I hope that this all made sense. Thanks in advance, </p>
  
  <p>Z</p>