问题描述
我有一个C#Web应用程序,当单击一个按钮时,它会启动一个新线程来进行一些处理.
我在Label控件中显示一条用户消息,指示该过程已开始.我将来自标签控件的引用传递给起始线程对象.线程完成后,我希望线程更新标签文本"以指示处理已完成.问题是标签文本未更新.我在主屏幕上使用UpdatePanel.当我指示线程正在启动但在线程结束时未更新时,它的工作正常.有任何想法吗?
I have a C# web application which starts a new thread to do some processing when a button is Clicked.
I display a user message in a Label control indicating that the process has started. I pass a reference from the lable control to the starting thread object. When the thread is finished I want the thread to update the label Text to indicate that the processing is complete. The problem is the label text is not updating. I''m using UpdatePanel on the main screen. Its working fine when I indicate that the thread is starting but is not updating when the thread is finished. Any ideas?
推荐答案
这篇关于标签文本未从新线程更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!