---
title: "UpdatePanel does not update"  
description: "UpdatePanel does not update"  
author: "Takeshi Okada"  
published: 2014-08-28  
updated: 2014-09-30  
canonical: https://www.mindstick.com/forum/2197/updatepanel-does-not-update  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 2 minutes  

---

# UpdatePanel does not update

I have an [asp.net](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) [website](https://www.mindstick.com/articles/13110/why-copywriting-is-crucial-for-new-website-build) which contains a Thread that fetches some data from a WCF [service](https://www.mindstick.com/articles/105963/online-thesis-writing-service-for-college-kids-with-disabilities). That thread runs in an [infinite](https://www.mindstick.com/forum/159435/react-app-crash-infinite-loop-identify-and-break) loop waiting each run for 1 second. Now I would like to show the stuff it got from the WCF service in a label. I added that label to an [UpdatePanel](https://www.mindstick.com/articles/151/asp-dot-net-ajax-server-control-updateprogress-updatepanel) and invoked the .[Update](https://www.mindstick.com/forum/156353/what-is-hummingbird-update)() [method](https://www.mindstick.com/forum/166/webservice-method). I don't get any [exceptions](https://www.mindstick.com/interview/22871/define-predifined-generic-exceptions), however, the label does not update at all. Here is my code (simplified):

```
t = new Thread(new ThreadStart(() =>{   while (true)   {      Label1.Text = GetFromWCF() + " " + DateTime.Now.ToString();      updatePanel.Update();      Thread.Sleep(1000);   }}));t.IsBackground = true;t.Start();
```

This code is in the [OnInit](https://www.mindstick.com/interview/34424/what-is-oninit-in-angular) Method of the page. The updatePanel looks like this:

```
<asp:ScriptManager runat="server" ID="scriptManager" EnablePartialRendering="true"/><asp:UpdatePanel runat="server" ID="updatePanel" UpdateMode="Conditional">   <ContentTemplate>      <asp:Label ID="Label1" runat="server" />   </ContentTemplate></asp:UpdatePanel>
```

Am I [missing](https://answers.mindstick.com/qa/52138/international-missing-children-s-day-2019-was-observed-on) anything? Maybe I should also inform you that I am very new to asp.net.

## Replies

### Reply by Pravesh Singh

```
<asp:UpdatePanel runat="server" ID="update" UpdateMode="Conditional">     <ContentTemplate>         <asp:Label runat="server" ID="uiTime" />         <asp:Button runat="server" ID="uiInternalButton" Text="Click" />     </ContentTemplate>     <Triggers>         <asp:AsyncPostBackTrigger ControlID="uiAsynch" EventName="click" />         <asp:PostBackTrigger ControlID="uiInternalButton" />     </Triggers></asp:UpdatePanel><asp:Button runat="server" ID="uiPostback" Text="Click" />
```

### Reply by Sumit Kesarwani

Hi takeshi,

```
<asp:UpdatePanel runat="server"ID="update" UpdateMode="Conditional">    
<ContentTemplate>         <asp:Label runat="server" ID="uiTime" />        
<asp:Button runat="server" ID="uiInternalButton" Text="Click" />    
</ContentTemplate>     <Triggers>        
<asp:AsyncPostBackTrigger ControlID="uiAsynch" EventName="click" />        
<asp:PostBackTrigger ControlID="uiInternalButton" />     </Triggers></asp:UpdatePanel><asp:Button runat="server" ID="uiPostback" Text="Click" />
```


---

Original Source: https://www.mindstick.com/forum/2197/updatepanel-does-not-update

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
