title: Multiple controls with the same ID 'add0' were found. FindControl requires that controls have unique IDs
body: <p>Previously Called: How to deal with dynamically created controls under load in aspx</p>
  
  <p>in  response to a question below: the information required to determine which controls to restore is contained in a dedicated viewstate object.</p>
  
  <p>I am dynamically creating controls in the codebehind page - these controls are all hooked up to click handlers so when a postback occurs I must re-create the previous set of controls, then clear the controls down and generate the new set of controls based on the previous click.</p>
  
  <p>This is coded and working correctly under normal circumstances esentially as follows:</p>
  
  <pre><code>in Page_Load
  if not postback generate default buttons 
  else if postback re-generate buttons that were shown on last page
  
  in click_handler
  Clear the dynamically generated buttons created in the Page_Load
  generate new buttons based on the specific click being handled
  </code></pre>
  
  <p>however when the server comes under load we start getting problems:</p>
  
  <p>With 5 users per second we start getting the exception:
  <strong>Multiple controls with the same ID 'add0' were found. FindControl requires that controls have unique IDs.</strong></p>
  
  <p>With 100 users per second we start getting the exception:
  <strong>The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases.</strong></p>
  
  <p>Once this occurs all subsequent requests get the same error and IIS has to be re-started.</p>
  
  <p>What could be causeing this and how can I avoid it?  Do html requests possibly overwrite and interfere with each other when under load? do objects somehow hand around after a page unload in a manner that would allow the next page load to trip over them?</p>