开发者

Calling main thread in asp.net C# [closed]

开发者 https://www.devze.com 2023-04-06 07:16 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 7 years ago.

开发者_开发技巧 Improve this question

I am calling method in separate thread. After sometime or after some event occurs I want to call main threads method. I am using C# in asp.net website.

To call separate thread i am using below code

 Thread thread       = new Thread(new ThreadStart(threadMethod));
 thread.Start();

From threadMethod how to call main method?

Thanks


Don't use threads, use ASP.NET Asynchronous operations.

That way you have a event handler fired when operation ends and you can update the page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号