Click here to Skip to main content
15,907,492 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How can I write a loop in Asp.net to run until all the member has signed off the document? I have the code and in that code, there is a bug which makes all persons sign off true although only one has sign-off.

Can anyone help me?

What I have tried:

I tried to create for loop and foreach loop in asp.net but did not work.
Posted
Updated 22-Nov-17 7:28am
Comments
F-ES Sitecore 22-Nov-17 11:54am    
There's probably a problem with your code, but as we can't see it we can't say what it is. If you're to implement a long-running loop that waits until certain conditions have been met then asp.net is not suitable for that. Instead when the person "signs off" you should check at that point if everyone has signed off on that document and if so do what you need to do.

You can't do that as ASP.NET is a web application, which is a request/response architecture. You could be waiting days for the next person to "sign off". No kind of loop is going to help you here.

If you're waiting for multiple clients to all "sign off" on a document, you have to track the state of every required persons "sign off". When you go to set the state of the "sign off" for a person, you can then check to see if everyone has "signed off" on the document and then push it along to the next stage, whatever that is.

No loop required.
 
Share this answer
 
User Input Validation in ASP.NET[^]
This may be more suitable for your requirement.
 
Share this answer
 

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