Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7692039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:45:40+00:00 2026-05-31T20:45:40+00:00

Platform: asp.net 4.0 I load scriptmanager from a baseclass for custom cdn handling and

  • 0

Platform: asp.net 4.0

I load scriptmanager from a baseclass for custom cdn handling and scripts inserting in pages and other custom things.

The problem is that when I insert an UpdatePanel it doesn’t find the script manager because updatepanel search for it to early.

Is there a solution that does not imply removing ScriptManager from the basePage.

this class is from our custom utility dll

public abstract class OurFrameworkBasePage:Page
{
    protected override void OnInit(EventArgs e)
    {
        CurrentScriptManager = BuildScriptManager();
        Form.Controls.AddAt(0, CurrentScriptManager);
        base.OnInit(e);
    }

    private ScriptManager BuildScriptManager()
    {
        return new ScriptManager
        {
            //some scriptmanager settings
        };
    }

    protected ScriptManager CurrentScriptManager { get; set; }
}

this is site specific basepage

public abstract class SiteBasePage:OurFrameworkBasePage
{
    //some custom methods and utility for a specific site
}

the default.aspx page

<html>
<head runat="server"><title></title></head>
<body>
    <form id="form1" runat="server">
       <div>
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <asp:Literal runat="server" ID="ltr"></asp:Literal>
                <asp:Button runat="server" OnClick="btnOkClick" ID="btnOk" Text="ok"/>
            </ContentTemplate>
        </asp:UpdatePanel>
       </div>
    </form>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:45:41+00:00Added an answer on May 31, 2026 at 8:45 pm

    Hopefully you have control over your framework class, as this will fix your issue:

    protected override ControlCollection CreateControlCollection()
    {
        CurrentScriptManager = BuildScriptManager();
        ControlCollection pageControls = base.CreateControlCollection();
        pageControls.AddAt(0, CurrentScriptManager);
        return pageControls;
    }
    protected override void OnInit(EventArgs e)
    {
        Form.Controls.AddAt(0, CurrentScriptManager);
        base.OnInit(e);
    }
    

    Needs to be in both places. First, in CreateControlCollection so that it is created along with all the other controls. Second, in OnInit, because the ScriptManager needs to reside in a form with runat=”server”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been tasked with porting/refactoring a Web Application Platform that we have from ASP.NET
Coding Platform ASP.NET 4.0 WebForms I have two pages that are relevant here Login.aspx
I have downloaded the ASP.NET MVC 2 Release version (using Web Platform Installer) as
I'm working with EpiServer CMS 6 on the ASP .net 4.0 platform. I can
I am implementing a web based chat platform in ASP.NET Web Application, and I
I'm kind of new to the .NET platform. And currently I'm learning ASP.NET MVC.
Platform: ASP.NET 3.5, ASP.NET Ajax intermixed I'm very green to jQuery, so have been
Platform: Server - ASP.NET 3.5 / C#; client side - javascript/jQuery This is what
Platform: C# ASP.NET 3.5 I have a ListView which builds a Rate field which
I'm writing a simple blogging platform with ASP.NET MVC. My question is regarding forms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.