title: What is the MVC equivalent of Find Control?
body: <p>In ASP.NET web forms it is possible to modify page controls from the master page.  For example, on a page "/Sample" I could set TextBox1 as readonly by doing the following.</p>
  
  <pre><code>//Site.master.cs
  protected void Page_Load(object sender, EventArgs e)
  {
      if (Request.Path.ToUpper().Contains("/SAMPLE"))
      {
          TextBox TB = MainContent.FindControl("TextBox1") as TextBox;
          TB.ReadOnly = true;
      }
  }
  </code></pre>
  
  <p>The question is... <strong>Is there an equivalent way to do this in an MVC application that uses a SiteLayout?</strong></p>
  
  <blockquote>
    <p>Background: We have purchased an MVC application and have access to modify the
    source code.  We need to customize the behaviors on some of the pages.  It
    will only be used by a few dozen people so a performance hit won't really be noticeable.  If this was a Web Forms
    application we would use the above method.  <em>However</em> this application
    is written with MVC and it is making our web form programmer (me) confused on how best to proceed.  Customizing numerous pages is going to be a headache when
    we have to patch the software.  Having all the changes in one central location
    would be easier to manage going forward.  How can you have one place where you can customize other pages programmatically in MVC?</p>
  </blockquote>