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 6862277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:38:31+00:00 2026-05-27T02:38:31+00:00

I am working on an asp.net/C# web application, In the main page: I have

  • 0

I am working on an asp.net/C# web application,

In the main page:

I have a place Holder inside of an update panel

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click"/>
    </Triggers>
    <ContentTemplate>
        <asp:PlaceHolder ID="PlaceHolder1" runat="server">
        </asp:PlaceHolder>
    </ContentTemplate>
</asp:UpdatePanel>

I use this to dynamicaly load a web user control when I click on “LinkButton1”

<asp:LinkButton ID="LinkButton1" runat="server" OnClick="Link1_Click">Load</asp:LinkButton></li>

in the code behind:

protected void Link1_Click(object sender, EventArgs e)
{
    PlaceHolder1.Controls.Clear();
    (MyControl) CC = (MyControl)LoadControl("Controls/MyControl.ascx");
    PlaceHolder1.Controls.Add(CC);
}

In the control I am loading I placed an update panel which is triggered by a check box in the control.

In MyControl:

<asp:UpdatePanel ID="MapRefresh" runat="server" UpdateMode="Conditional">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="CheckBox1" EventName="CheckedChanged" />            
    </Triggers>
    <ContentTemplate>
        //Here I place the things I want to update
    </ContentTemplate>
</asp:UpdatePanel>

The checkbox is declared outside the update panel

<asp:CheckBox ID="CheckBox1" Checked="true" Text="View" runat="server" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" />

in the code behind:

protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
    //Do the update on the controls that are in the update panel
}

The problem:

From the main page, when I click on the LinkButton1 The control load correctly and everything is fine.
But When I click on the checkbox of the control, it does not update the inner update panel like i want it to. The control just disappear from the main page.

Any help is greatly appreciated.
Thanks in advance and I hope I was clear

  • 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-27T02:38:32+00:00Added an answer on May 27, 2026 at 2:38 am

    You need to create the user control in the page onload event and make it hidden. Recommend you create the control there and use the link button to make it visible and set other properties.

       protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            //-- Create your controls here
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a web application (asp.net mvc3) I have a Main div.
I am working on asp.net, C# web application. Working on my main page in
I am working on a large web application implemented in ASP.net. The main part
I'm working on Asp.net MVC3 web application. I'm having one page on which appx.
I'm working on an ASP.NET web application. There's a bill page which has two
I have 2 asp.net web applications, one of which is the main application and
I'm working on an ASP.net web application. I have a form with a submit
We have working ASP.Net web application with WCF. wcf service hosted as a windows
I have working in asp.net web application. Here I need to run JavaScript before
I am working on a asp.net web application. I have a stack of DIV

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.