title: ASP.NET Ajax Find Component Problem
body: <p>I've got a page where I have a ModalPopUpExtender which I want to show from code.</p>
  
  <p>This is my site structure which is a web form within a nested masterpage:</p>
  
  <pre><code>    ...
      &lt;asp:Content ID="con" ContentPlaceHolderID="mainContent" runat="server"&gt;
          &lt;asp:MultiView ID="tabMultiView" runat="server"&gt;
              &lt;asp:View ID="generalTab" runat="server"&gt;
                  &lt;asp:ScriptManager ID="scriptManager"  runat="server"&gt;
                  &lt;/asp:ScriptManager&gt;
  
                  &lt;ajaxToolkit:ModalPopupExtender ID="newAddressModalPopup" CancelControlID="newAddressDialogCancelButton"
                      BackgroundCssClass="modalBackground" TargetControlID="newAddressLink" PopupControlID="newAddressDialogDiv"
                      runat="server"&gt;
                  &lt;/ajaxToolkit:ModalPopupExtender&gt;
                  ...
  
                  &lt;a href="" onclick="openNewAddressDialog()"&gt;open dialog&lt;/a&gt;
  
                 &lt;script type="text/javascript"&gt;
  
  
                      function openNewAddressDialog() {
                          $find('&lt;%= newAddressModalPopup.ClientID %&gt;').show();
                      }
                  &lt;/script&gt;
  ...
  </code></pre>
  
  <p>The find method always returns null. I also tried findComponent, etc. It's always null. When I debugged the method I noticed that the components collection (which is kind of a dictionary with the control ID as key) is empty.</p>
  
  <p>What could the problem be? BTW, I am using jQuery stuff on the page as well.</p>
  
  <p>Thanks a lot!</p>