title: FindControl looks for controls in incorrect template of FormView
body: <p><strong>How do you locate controls from the codebehind when switching modes in a FormView?</strong>
  It looks like you can't use FindControl during the Page_Load event, since it will be searching for controls in the previously shown template rather than the newly selected one.
  I suspect you can't rely on the PageLoad alone but have to find controls within another event, like OnDataBound, but should you really HAVE to do that?
  I've seen several formviews in my day that lack events like OnDataBound...</p>
  
  <p><strong>More details about my specific case:</strong>
  I've got a formview where both the ItemTemplate, InsertItemTemplate and EditItemTemplate contain the same textbox. (it's got the same ID in all templates)</p>
  
  <p>During the Page_Load event I use FindControl to locate the textbox and change it's visibility.
  Works perfectly fine when initially loading the formview, but for some reason it doesn't work when the form is changing modes/changing templates (after the page has rendered you see that the textbox visibility is incorrect)</p>
  
  <p>For instance switching from read to edit mode - the formview.Mode will be set to FormViewMode.Edit, but when using FindControl during the PageLoad event it will search for controls within the ItemTemplate rather than the EditItemTemplate.
  Thus, if you have a control with the same ID in all templates it will find the control within the incorrect template, and after the page has loaded you'll be extremely confused as to why the control that's loaded doesn't have the same properties as you thought it when you examined it in the debugger during the pageLoad.</p>