Click here to Skip to main content
15,894,646 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello All,

My question here is : Is it possible to have more than one thread on a single web-page in C# 4.0?

In this case , I have .aspx page having more than 6buttons on it , every button is going to call script which is taking at least 30mins to gets completed. so I am starting a new thread and new session to show progress pop-window during whole execution of shell script. It is working fine with use of one button but now I have to use same logic for every button. So Is it possible to have more than one thread and session on one page?
Posted

1 solution

It should be. Try it and see. BTW, what happens to a thread running on a web page if the user navigates away from the page (or shuts down the browser)? It might be better to run your lengthy operation in a web service, or by communicating with a Windows service on the web server.
 
Share this answer
 
v3
Comments
Sergey Alexandrovich Kryukov 7-Mar-11 12:04pm    
Agree, my 5.
--SA
Manfred Rudolf Bihy 7-Mar-11 12:19pm    
Did you forget to vote? :)
Sergey Alexandrovich Kryukov 7-Mar-11 15:13pm    
Let me check... Yes it looks like that. Sorry, it happens sometimes (with others, too); please don't hesitate to remind me, because can forget sometimes :-)
--SA
Manfred Rudolf Bihy 7-Mar-11 12:20pm    
Agreed, take my 5.
Albin Abel 7-Mar-11 23:19pm    
My 5. Good point

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900