title: How to use Ajax ScriptManager and ToolkitScriptManager in master page and content pages respectively without errors
body: <p>I have an Ajax Script manager in my Master page since my pages use ajax. But in one of my content pages, I need to use AutoCompleteExtender in AjaxControlToolkit which requires the use of ToolScriptManager available in the toolkit. But this leads to an error saying <strong>Only one instance of a ScriptManager can be added to the page</strong>. I searched over the internet for a solution. Many programmers suggests the use of a ScriptManagerProxy to solve this issue. Another alternative is using ToolscriptManager in the master page instead of ScriptManager. Can anyone please demonstrate how to solve this issue by using ScriptManagerProxy since I think that is a better way of solving the issue?</p>
  
  <p>Here is the code of my master page:</p>
  
  <pre><code>&lt;form runat="server" id="bodyForm"&gt;
  &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
  &lt;/asp:ScriptManager&gt;
  &lt;asp:ContentPlaceHolder ID="ContentPlaceHolderBodyMain" runat="server"&gt;
  &lt;/asp:ContentPlaceHolder&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is the code of my content page:</p>
  
  <pre><code>&lt;asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"&gt;
  &lt;/asp:ToolkitScriptManager&gt;
  &lt;asp:TextBox ID="TextBoxStudentID" runat="server" autocomplete="off"&gt;&lt;/asp:TextBox&gt;
      &lt;asp:AutoCompleteExtender ID="AutoCompleteExtenderStudentID" runat="server" 
      EnableCaching="true" BehaviorID="AutoCompleteEx" MinimumPrefixLength="2" 
         TargetControlID="TextBoxStudentID" ServicePath="~/CampusMateWebService.asmx" ServiceMethod="GetCompletionListForStudentID" 
         CompletionInterval="50" CompletionSetCount="30" 
         CompletionListCssClass="autocomplete_completionListElement" CompletionListItemCssClass="autocomplete_listItem" 
         CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem" 
         DelimiterCharacters=";, :" ShowOnlyCurrentWordInCompletionListItem="true"&gt;
      &lt;Animations&gt;
        &lt;OnShow&gt;
        &lt;Sequence&gt;
        &lt;%-- Make the completion list transparent and then show it --%&gt;
        &lt;OpacityAction Opacity="0" /&gt;
        &lt;HideAction Visible="true" /&gt;
  
        &lt;%--Cache the original size of the completion list the first time
          the animation is played and then set it to zero --%&gt;
        &lt;ScriptAction Script="// Cache the size and setup the initial size
                                      var behavior = $find('AutoCompleteEx');
                                      if (!behavior._height) {
                                          var target = behavior.get_completionList();
                                          behavior._height = target.offsetHeight - 2;
                                          target.style.height = '0px';
                                      }" /&gt;
        &lt;%-- Expand from 0px to the appropriate size while fading in --%&gt;
        &lt;Parallel Duration=".2"&gt;
        &lt;FadeIn /&gt;
        &lt;Length PropertyKey="height" StartValue="0" 
          EndValueScript="$find('AutoCompleteEx')._height" /&gt;
        &lt;/Parallel&gt;
        &lt;/Sequence&gt;
        &lt;/OnShow&gt;
        &lt;OnHide&gt;
        &lt;%-- Collapse down to 0px and fade out --%&gt;
        &lt;Parallel Duration=".2"&gt;
        &lt;FadeOut /&gt;
        &lt;Length PropertyKey="height" StartValueScript=
          "$find('AutoCompleteEx')._height" EndValue="0" /&gt;
        &lt;/Parallel&gt;
        &lt;/OnHide&gt;
        &lt;/Animations&gt;
      &lt;/asp:AutoCompleteExtender&gt;
  </code></pre>