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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:13:22+00:00 2026-06-17T08:13:22+00:00

This leads on from a problem with another thread….but is more focussed on one

  • 0

This leads on from a problem with another thread….but is more focussed on one point hopefully!

I’ve got an AJAX update Panel

<asp:UpdatePanel
     ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
           <ContentTemplate>
                                <asp:Label ID="lblMessage1" runat="server" />
                                <asp:Label ID="lblMessage2" runat="server" />
                                <asp:Button ID="btnTrigger" runat="server"        onclick="Button1_Click" style="visibility:hidden"/>

              </ContentTemplate>
 </asp:UpdatePanel>

And my code behind is this

 protected void Button1_Click(object sender, EventArgs e)

    {
        Type cstype = this.GetType();
        Label message1 = (Label)(FindControl("lblMessage1"));
        Label message2 = (Label)(FindControl("lblMessage2"));

        message1.Text = "adam";
        UpdatePanel1.Update();

        Thread.Sleep(5000);

        message2.Text = "adam2";
        UpdatePanel1.Update();

I want to see Adam appear and then Adam2 after 5 seconds, but they both appear together.

  • 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-06-17T08:13:23+00:00Added an answer on June 17, 2026 at 8:13 am

    The code you have provided will set the value in message1.Text ON THE SERVER, wait 5 seconds ON THE SERVER, and then set message2.Text ON THE SERVER… it will then send everything back to the client in one go. That is why you’re seeing it all update at the same time.

    If you want them to be updated at different times, you will need more complex coding to call two separate things on the server, and display them independently.

    For that, you’re probably going to have to look at TWO <asp:UpdatePanel> objects, or write your own AJAX handling code in javascript/jquery

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

Sidebar

Related Questions

I need to do this but one step leads me to uncheck the Allow
I'll like to combine both my initial problem which leads me to this one
Good day everyone. This problem was part of another one which it as been
How do I modify this MySQL query to only count leadIDs from table leads
Following leads in this thread and others, I've set up a code block where
In this asp.net page, there is a link that leads to another page in
this is more of a 'best practice' question than an actual problem: I'm working
This is more of an informational question than a problem that needs a solution.
UPDATE : I asked this question in another form (see below), and it got
Ignoring unsafe code, .NET cannot have memory leaks. I've read this endlessly from many

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.