ScriptManager not found on page after upgrade to 1.0

Last post 08-16-2008 9:35 PM by Dougnutz. 7 replies.

Sort Posts:

  • ScriptManager not found on page after upgrade to 1.0

    02-07-2007, 5:19 PM
    • Loading...
    • Nate Dogg
    • Joined on 12-29-2005, 5:59 PM
    • Posts 6

    Any of my existing AJAX pages that have an Extender control (Calendar, filtered text box, etc) come up with an error saying:

    The control with ID 'CalendarExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

    If I take the CalendarExtender1 off of the page, the page loads fine.  I have a few UpdatePanels that work fine when that control is not on my page.

     Any ideas on how I can fix this error?  Is is my install?

    Thanks,

    Nathan

  • Re: ScriptManager not found on page after upgrade to 1.0

    02-07-2007, 5:50 PM
    • Loading...
    • Garbin
    • Joined on 09-17-2004, 12:35 PM
    • Sassari, Italy
    • Posts 1,495
    • ASPInsiders
      TrustedFriends-MVPs

    Hi,

    where are you declaring the Calendar extender in the page?

    Alessandro Gallo | Blog | My book: ASP.NET AJAX In Action
  • Re: ScriptManager not found on page after upgrade to 1.0

    02-07-2007, 6:11 PM
    • Loading...
    • Jason Hill
    • Joined on 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 476

    Yeah...just make sure the ScriptManager is at the top of the page, just after the form declaration.  If you are using MasterPages and you have AJAX control in the master page, then you will need to define the ScriptManager in the master page.

    Jason

  • Re: ScriptManager not found on page after upgrade to 1.0

    05-01-2008, 2:16 PM
    • Loading...
    • Naom
    • Joined on 12-31-2007, 2:08 PM
    • New York
    • Posts 783
    We have the same problem now. We do have master page, but the original developer did put ScriptManager at the individual pages rather than in MasterPage. And now we're having this problem. On the page the ScriptManager is at the top in the content page.
  • Re: ScriptManager not found on page after upgrade to 1.0

    05-01-2008, 9:47 PM
    • Loading...
    • anhphan
    • Joined on 08-28-2006, 8:12 PM
    • Posts 35

    You can declare a ScriptManager in a content page as follows:

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <asp:Button ID="Button1" runat="server" Text="Button" />

    <cc1:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" runat="server"

    ConfirmText="" Enabled="True" TargetControlID="Button1">

    </cc1:ConfirmButtonExtender>

    </ContentTemplate>

    </asp:UpdatePanel>

     

    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

    <cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"

    Enabled="True" TargetControlID="TextBox1">

    </cc1:CalendarExtender>

    </asp:Content>

  • Re: ScriptManager not found on page after upgrade to 1.0

    05-02-2008, 9:57 AM
    • Loading...
    • Naom
    • Joined on 12-31-2007, 2:08 PM
    • New York
    • Posts 783

     Here is what I'm saying.

     We have an application working properly in VS2005 and NET Framework 2.0

     

    I installed NET Framework 3.5 and VS 2008 (made a copy of my application first) and then run it. On a page that worked previously I'm now getting this error:

     

    Server Error in '/FCAdmin' Application.

    The control with ID 'CalendarExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidOperationException: The control with ID 'CalendarExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [InvalidOperationException: The control with ID 'CalendarExtender1' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.]
    System.Web.UI.ExtenderControl.get_ScriptManager() +198
    System.Web.UI.ExtenderControl.RegisterWithScriptManager() +151
    System.Web.UI.ExtenderControl.OnPreRender(EventArgs e) +17
    AjaxControlToolkit.ExtenderControlBase.OnPreRender(EventArgs e) in d:\E\AjaxControlToolkit\Release\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs:391
    System.Web.UI.Control.PreRenderRecursiveInternal() +86
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
     

     The page is quite complex, has several user controls, GridView and several FormViews. Initially page loads and I noticed that grid sorting, for example, is done much faster and without re-loading the whole page (no UpdatePanels on this page).

    The page begins with :

    <%@ Page Language="C#" AutoEventWireup="false" MaintainScrollPositionOnPostback="true"
        MasterPageFile="~/admin.master" CodeFile="Registration.aspx.cs" Trace="false" EnableEventValidation="false"
        Title="FC Admin - Registration" Theme="Profesional" Inherits="Registration_Form" %>
    <%@ Register src="../../UCD/Tags.ascx" TagName="Tags" TagPrefix="uc5" %>
    <%@ Register src="../../UCD/AtHomeManMatch.ascx" TagName="AtHomeManMatch" TagPrefix="uc4" %>
    <%@ Register src="../../UCD/FriendsAvailbility.ascx" TagName="FriendsAvailbility"
        TagPrefix="uc3" %>
    <%@ Register src="../../UCD/VFriendsAtHAvailbility.ascx" TagName="VFriendsAtHAvailbility"
        TagPrefix="uc2" %>
    <%@ Register Assembly="SqlWhereBuilder" Namespace="UNLV.IAP.WebControls" TagPrefix="cc2" %>
    <%@ Register src="../UCD/DateCombo.ascx" TagName="DateCombo" TagPrefix="uc1" %>
    <%@ Register TagPrefix="Custom" Assembly="AutoSuggestBox" Namespace="ASB" %>
    <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajax" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" ID="Registrtration" runat="server">
    <asp:ScriptManager EnablePageMethods="true" ID="scriptManager"
            EnablePartialRendering="true" runat="server"
            LoadScriptsBeforeUI="false"></asp:ScriptManager>
        <div>       
            <table>
                <tr>
                    <td valign="top" align="center" style="width: 696px;padding-top:15px;">
                   
    <div style="text-align: left;">
    <asp:TextBox ID="search" Width="150px" OnPreRender="SearchPrerender" runat="server" />&nbsp;<asp:Button ID="search_go"  BorderWidth="2" BorderStyle="Groove" Text="GO" OnClick="DoSearch" runat="server" EnableViewState="False" CausesValidation="False" />
    <span style="margin-left:125px">
    <asp:ImageButton ImageUrl="../../images/id_card_view.png" ID="show_all" OnClick="RefreshMainGrid" runat="server" EnableViewState="False" CausesValidation="False" CssClass="peopleVNavIcon" AlternateText="Show All Records" ToolTip="Show All Records" />
    <%--<a href="CreatePerson.aspx"><img alt="AddPerson" class="peopleVNavIcon" title="Add a New Person" src="../../images/id_card_new.gif" /></a>
    --%>
    <img   src="" id="imgRecycle" alt="Recycle" runat="server" enableviewstate="false" title="Go to Recycling Bin" visible="false" class="peopleVNavIcon" />
    </span>


    <% if (clseditmode.editmode != true){ %>

    What can we do to fix the problem? I do wish to use the new Framework and VS2008. 

     

     

     

     

     

  • Re: ScriptManager not found on page after upgrade to 1.0

    05-02-2008, 11:25 AM
    • Loading...
    • Naom
    • Joined on 12-31-2007, 2:08 PM
    • New York
    • Posts 783

    Hi everybody,

    I fixed the problem by installing new version of AJAX toolkit from http://www.codeplex.com/AtlasControlToolkit/Release/ProjectReleases.aspx?ReleaseId=11121

    Interesting, that the site still has Atlas in it :)

     This is also an important link

    http://msdn.microsoft.com/en-us/library/bb907623.aspx

     

     

     

  • Re: ScriptManager not found on page after upgrade to 1.0

    08-16-2008, 9:35 PM
    • Loading...
    • Dougnutz
    • Joined on 10-29-2005, 1:00 AM
    • Posts 5

    Thanks for posting this fix. It worked for me too.

    I downloaded the 3.5 version everything works like it did before the *upgrade* :)

Page 1 of 1 (8 items)
Microsoft Communities
Page view counter