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

  • Home
  • SEARCH
  • 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 815267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:39:26+00:00 2026-05-15T01:39:26+00:00

The JavaScript generated by the asp.net SciptManager control seems to have a bug and

  • 0

The JavaScript generated by the asp.net SciptManager control seems to have a bug and cant handle hidden UpdatePanels. A JavaScript error is thrown when a control within one updated panel tries to make another update panel visible.

Is this a bug with ASP.Net AJAX? And does anyone have any ideas how to get around this?

Here is an example of what I’m trying to do

<script type="text/C#" runat="server">
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Panel1.Visible = true;
    }
</script>

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

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Text="Show Panel"></asp:LinkButton>
    </ContentTemplate>
</asp:UpdatePanel>

<asp:Panel ID="Panel1" runat="server" Visible="false">
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            blah bla blah
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Panel>

This is the JavaScript error that gets thrown when clicking on the “LinkButton1” link. This error comes from the JavaScript that is generated by the asp.net ScriptManager control

Error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolder1_UpdatePanel2'
  • 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-15T01:39:27+00:00Added an answer on May 15, 2026 at 1:39 am

    You’re running into problems because Panel1’s contents are not rendered when the page is first rendered. This has the effect that UpdatePanel2 is not properly initialised.

    (The page request manager, which manages all the partial updates, needs to be aware of UpdatePanel2’s existence and this just won’t happen if it is not rendered. Also, if you think about it, the update panel needs to render some elements if only to add a placeholder div into which it will inject its content on partial postbacks).

    I don’t know precisely what you are trying to achieve but, if you simply want your UpdatePanel2 to be triggered by a control that is not itself inside the update panel, then set LinkButton1 as a trigger like so.

    <script runat="server">
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            blabla.Visible = true;
        }
    </script>
    
    <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
    </asp:ScriptManager>
    
    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Text="Show Panel"></asp:LinkButton>
    
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" >
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="LinkButton1" />
        </Triggers>
        <ContentTemplate>
            <asp:PlaceHolder runat="server" ID="blabla" Visible="false">
            blah bla blah
            </asp:PlaceHolder>
        </ContentTemplate>
    </asp:UpdatePanel>
    

    If LinkButton1 must indeed be inside an update panel (perhaps LinkButton1 is not always visible?) then you can do something like the following

    <script runat="server">
        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            blabla.Visible = true;
            UpdatePanel2.Update();
        }
    </script>
    
    <asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
    </asp:ScriptManager>
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
        <ContentTemplate>
            <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Text="Show Panel"></asp:LinkButton>
        </ContentTemplate>
    </asp:UpdatePanel>
    
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="LinkButton1" />
        </Triggers>
        <ContentTemplate>
            <asp:PlaceHolder runat="server" ID="blabla" Visible="false">
            blah bla blah
            </asp:PlaceHolder>
        </ContentTemplate>
    </asp:UpdatePanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 396k
  • Answers 396k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Since I was unable to do this via the client… May 15, 2026 at 2:53 am
  • Editorial Team
    Editorial Team added an answer I think should fix your issue. https://mootools.lighthouseapp.com/projects/24057/tickets/121-accordion-fix-a-way-to-get-nested-accordions-working-properly It's a small… May 15, 2026 at 2:53 am
  • Editorial Team
    Editorial Team added an answer ANY of these styles that you mentioned, as long as… May 15, 2026 at 2:53 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.