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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:13:04+00:00 2026-05-11T18:13:04+00:00

I have an ASP.NET website containing the following <asp:UpdatePanel ID=UpdatePanel1 runat=server > <ContentTemplate> <asp:Label

  • 0

I have an ASP.NET website containing the following

<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
     <ContentTemplate>
          <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>                
     </ContentTemplate>            
</asp:UpdatePanel>

I have created a thread function. And during the execution of this function I would like to update some controls on the user interface.

protected void Page_Load(object sender, EventArgs e)
{
    new Thread(new ThreadStart(Serialize_Click)).Start();
}
protected void Serialize_Click()
{
    for (int i = 1; i < 10; i++)
    {
        Label1.Text = Convert.ToString(i);
        UpdatePanel1.Update();
        System.Threading.Thread.Sleep(1000);
    }
}

How could I update a web-control during a thread-execution? do I need to force the “UpdatePanel1” to post-back? how?

  • 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-11T18:13:04+00:00Added an answer on May 11, 2026 at 6:13 pm

    You’ll need to use a client-side timer (or some other method) to have the browser ask the server for the update, such as this simplified example:

    <asp:UpdatePanel ID="up" runat="server">        
        <ContentTemplate>
            <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="timer_Ticked" />
            <asp:Label ID="Label1" runat="server" Text="1" />
        </ContentTemplate>
    </asp:UpdatePanel>
    

    Then in your codebehind:

    protected void timer_Ticked(object sender, EventArgs e)
    {
        Label1.Text = (int.Parse(Label1.Text) + 1).ToString();
    }
    

    If you have a background process that is updating some state, you will either need to store the shared state in the session, http cache, or a database. Note that the cache can expire due to many factors, and background threads can be killed any any tie if IIS recycles the application pool.

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

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • 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 it is an HTML email, you can easily embed… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Sourceforge can be still browsed by programming language, although it… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer A Context is a collection of data, often stored in… May 12, 2026 at 1:19 am

Related Questions

I implemented OpenID support for an ASP.Net 2.0 web application and everything seems to
We have a Web project containing both an ASP.Net (forms) UI, and some WCF
Tonight I copied an ASP 2.0 web site onto a client's machine, and lo!
I am preparing for the development of an enterprise-style application for a very small

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.