title: Adding reference to AjaxControlToolkit to web.config file
body: <p>I'm trying to add some ajax controls to my page:</p>
  
  <pre><code>&lt;asp:Button runat="server" ID="lnkDelete" CommandName="DeleteCity" CssClass="rowbutton" CommandArgument='&lt;%# Eval("cityid") %&gt;' Text="Delete" /&gt;
  
  &lt;ajax:ConfirmButtonExtender runat="server" ID="confirm_Delete" TargetControlID="lnkDelete" ConfirmText="Deleting a city will delete all Suburbs, DICs and Appointments associated with it.&amp;#10;Do you want to continue?"&gt;
  &lt;/ajax:ConfirmButtonExtender&gt;
  </code></pre>
  
  <p>I've checked a couple of questions on SO and I found <a href="http://forums.asp.net/t/1174924.aspx" rel="nofollow">this</a> as well, but still not having any luck getting pages to accept the new tag.</p>
  
  <p>When I register the AjaxControlToolkit on Page level, it works, but when I add it to the web.config file, it still can't find the server tag:</p>
  
  <pre><code>&lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %&gt;`) it works, but I'd rather not do this for every page that I need to use ajax on.  
  </code></pre>
  
  <p><strong>Note:</strong> Registering this way doesn't work if it is done on the master page.</p>
  
  <p>I have the following in my web.config file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
  --&gt;
  &lt;configuration&gt;
      &lt;system.web&gt;
          &lt;customErrors mode="Off" /&gt;
          &lt;pages styleSheetTheme="Default"&gt;
            &lt;controls&gt;
              &lt;add tagPrefix="ajax" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" /&gt;
            &lt;/controls&gt;      
          &lt;/pages&gt;
      &lt;/system.web&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Have I done something wrong? What's the right way to do it here?</p>
  
  <p>In case it might be important, I'm using AjaxControlToolkit version 4.1.51116</p>