title: ASP.Net codebehind can't access component from page?
body: <p>For an unknown reason, I have 1 page that I can't access by ID to any of the component.</p>
  
  <p>Here is some informations. The page use asp:Content because the website use MasterPage. Inside the asp:Content, this page has a asp:FormView with some data that I cannot access from the CodeBehind.</p>
  
  <p>Here is the Page declaration:</p>
  
  <blockquote>
    
  </blockquote>
  
  <p>Here is the code in the page behind that doesn't compile :</p>
  
  <pre><code>protected void FormView1_PreRender(object sender, EventArgs e)
  {
      DateBirthdayValidator.MaximumValue = DateTime.Now.Date.ToString("dd-MM-yy");
  }
  </code></pre>
  
  <p>Here is the error : </p>
  
  <blockquote>
    <p>Error 2   The name 'DateBirthdayValidator' does not exist in the current context</p>
  </blockquote>
  
  <p>I have search in google, I got some answer about using FindControl but it doesn't work. Any idea?</p>
  
  <h2>Edit1:</h2>
  
  <p>I can access the FormView1 component but no the validator inside the EditItemTemplate. How can I access control that is inside the EditTemplate?</p>
  
  <h2>Edit2:</h2>
  
  <p>If I try: <code>FormView1.FindControl("DateBirthdayValidator")</code> it compile but always return null. So still doesn't work but at least I can access the FormView1...</p>