c# - ASPX Loading Page -
So I'm learning to develop .aspx websites on Visual Studio 2013 and want to know if there is any way What is a "loading screen" during executing an executable?
The idea is that the user generates the button, it runs executable and displays the second page / pop-up windows / etc. There will be a loading image and some text until the executable is finished. So I want to redirect it to another page.
Is that the best way to do this?
Code examples are always a plus! Thanks
From a high level perspective:
- The user requests the process To get started on your web-application (I think this is a command-line
.exe
that you want to run and wait) - Request handler one The new spawn will be thread which then starts the new process and waits for the process to end. Your code will provide an arbitrary tag to this thread / process and store it elsewhere. When the process is finished, the child tells the Thread Store to update that the process has ended.
- The request handler then informs the user immediately for responding that the process is currently underway.
- In the immediate response page, javascript or
& lt; Meta http-equiv = "refresh" />
causing the page to be reloaded every 10 seconds or more, or kick-off A - when the request handler receives the request again, Will see in the store made in and see if it is complete or not, if it does, then it will return the same "Please wait" auto-refreshing response, otherwise it will return the next page you expected, as The process is complete.
Something like this:
// Note that these fields are static, so they are page-loaded private static dictionaries & lt; Int32, Boolean & gt; _procrias = new dictionary & lt; Int32, Boolean & gt; (); Private Static Int32 _processNum; Action ringtoneback sound () {int32 num = _processNum ++; _processes.Add (num, false); Thread Thread = New Thread (Rep. (Process Pro = New Process ("Myx X."); Proc.Start (); proc.WaitForExit (); _ Processes [num] = true; // is marked Completed} ); Thread.Start (); See Return ("BackgroundTaskIsRunning.aspx", num); } ActionResult GetBackgroundTaskState (Int32 num) {// Token 'namb' received from customer (if_process [number]) {return see ("NextTask.aspx"); } Else {// Similar to viewing before looking back ("BackgroundTaskIsRunning.aspx", num); }}
Comments
Post a Comment