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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:59:30+00:00 2026-05-20T20:59:30+00:00

In my UserControl, Im trying to update a updatepanel that is inside a repeater

  • 0

In my UserControl, Im trying to update a updatepanel that is inside a repeater like this:

HTML-Markup

<asp:UpdatePanel ID="updDocumentQuickView" runat="server" UpdateMode="Conditional">
  <ContentTemplate>
    <asp:Repeater ID="repFolders" runat="server" OnItemDataBound="repFolders_OnItemDataBound" OnItemCommand="repFolders_OnItemCommand">
        <ItemTemplate>

            <asp:LinkButton ID="lnkFolder" runat="server"></asp:LinkButton>  

            <asp:UpdatePanel ID="updFiles" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Repeater ID="repFiles" runat="server" OnItemDataBound="repFiles_OnItemDataBound">
                        <ItemTemplate>
                            <%# Container.DataItem %> 
                        </ItemTemplate>                             
                    </asp:Repeater>   
                </ContentTemplate>                
            </asp:UpdatePanel>
        </ItemTemplate>        
    </asp:Repeater>
  </ContentTemplate>
</asp:UpdatePanel>

C#-code

protected void repFolders_OnItemCommand(object sender, CommandEventArgs e)
{  
    int intRow = -1;

    ScriptManager myScriptManager = (ScriptManager)Page.Master.FindControl("myScriptManager");

    Match myMatch = Regex.Match(myScriptManager.AsyncPostBackSourceElementID, "repFolders.ctl([0-9]*).lnkFolder");

    if (myMatch != null)        
        intRow = Convert.ToInt32(myMatch.Groups[1].Value);

    if (intRow > -1)
    {
        RepeaterItem myItem = repFolders.Items[intRow];

        Repeater repFiles = (Repeater)myItem.FindControl("repFiles");
        UpdatePanel updFiles = (UpdatePanel)myItem.FindControl("updFiles");

        string[] arr1 = new string[] { 
                                    "array item 1", 
                                    "array item 2", 
                                    "array item 3", 
                                    "array item 4", 
                                    "array item 5" };

        repFiles.DataSource = arr1;
        repFiles.DataBind();

        updFiles.Update();
    }
}

The end result I get is that updDocumentQuickView is the UpdatePanel that gets updated, and not updFiles. If i wrap an UpdatePanel around lnkFolder, then that UpdatePanel gets updated, with the same C# code. Ive checked what kind of data that are sent back with fiddler, and the wrong UpdatePanel is sent. Im getting the correct RepeaterItem, and both repFiles and updFiles are found. What do I miss to get the right UpdatePanel to get updated?

UPDATE

Hawxby solution solved the problem with updDocumentQuickView getting updated, thanks for that. But im still having problems with updFiles sending nothing back. Some further testing, with putting literals inside updFiles and working, tells me that theres something with repFiles that isnt returned. repFiles does have data that is bounded.

FINAL SOLUTION

repFiles.Visible were set to false in repFolders_OnItemDataBound, no wonder it didnt show.

  • 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-20T20:59:31+00:00Added an answer on May 20, 2026 at 8:59 pm

    It’s likely because you have to explicitly set the async bindings

    <asp:UpdatePanel ID="updDocumentQuickView" ChildrenAsTriggers="false">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="repFolders" EventName="repFolders_OnItemCommand" />
        </Triggers>
    
    </asp:UpdatePanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to save some UserControl-Infos into a List like this: List<UserControlDetails> myList; public
This is what I'm trying to do: I'm writing a UserControl that I want
okay? I have a button that is inside an updatepanel, click on this button
I'm trying to create a UserControl that inherits from a generic class. It does
Is there anyway to embed a usercontrol inside a WIX installer? We're trying to
I'm trying to create a user control that allows users to make something like
I would like to first load an ASP.NET page and then fire a server-side
I am trying to bind a userControl that I create in a class as
I am trying to create a datapager usercontrol. This user control has one event
I am trying to set twoway binding on a UserControl that I have created.

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.