title: UpdatePanel error when dynamically adding User controls into a page
body: <p>Allright so I have a slight issue when I want to load some basic usercontrols which contain an UpdatePanel inside to another page which is an usercontrol.</p>
  
  <p><strong>The set up:</strong></p>
  
  <p>Whenever an user clicks on a button a pop-up shows up containing some basic info on a certain person and a tab which contains the companies he worked for. The amount of companies he/she works for can range from 1 to 4~, so I do a query then for each company I get I add a view to a multiview, this view contains multiple simple user controls (Textfields inside an updatepanel). Now whenever I go to the page I get this error:</p>
  
  <blockquote>
    <p>Cannot unregister UpdatePanel with ID 'UpdatePanel2' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported. Parameter name: updatePanel </p>
  </blockquote>
  
  <p>Now I know this is a common error caused by generating UpdatePanels dynamically which aren't registered with the ScriptMaster. I can't add a PreInit event handler to the page which adds the UserControls with the UpdatePanels since it's an UserControl itself.</p>
  
  <p><strong>My question is:</strong></p>
  
  <p>How can I get rid of this nasty error in a not so nasty way e.g. not a hardcoded sub routine which adds the UpdatePanel to the scriptmaster</p>