Calling main thread in asp.net C# [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
开发者_开发技巧 Improve this questionI 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.
精彩评论