title: ASP .NET MVC correct UserControl architecture
body: <p>I'm trying to learn the new ASP .NET MVC framework and would like to know the best practice for using UserControls.</p>
  
  <p>I understand that you can render UserControl's as a partial and pass data to them from a controller. Ideally I would think that it makes sense not to have a code behind file as this creates a temptation to break the MVC rules.</p>
  
  <p>I'll give an example where I don't understand how UserControls fit into the pattern.</p>
  
  <blockquote>
    <p>I have a UserControl that shows the
    latest tags (much like on
    StackOverflow). Unlike StackOverflow I
    want to display this UserControl on
    all of my pages. If  I have a
    controller say QuestionController
    which is meant to handle actions from
    some question views e.g. view and
    detail, does this mean I have to fetch
    the data in the QuestionController and
    then pass it to the UserControl?</p>
    
    <p>If I create another controller say
    SearchController then I would have to
    replicate the same functionality to
    get the latest tags to pass to a
    partial again. Doesn't this mean that
    the 2 different controllers are doing
    extra things that they weren't
    originally intended to do?</p>
  </blockquote>