Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What you are essentially asking for cannot be achieved with the current design of your page/actions. You are clicking a link that makes a request to your controller. The controller is going to wait until the action is finished before rendering and returning a response. This is different than making an ajax call which would return the data to the current page instead of directing you to a new url. There are many ways to do this, and a lot of them depend on your requirements for how you want it to work.</p> <p>If it was me, and I was trying to do a large operation, This is what I would do. Display a spinner or some sort of icon with a message saying "this could take awhile" and make an ajax request to your action. When the action returns you can display a message or redirect to a new route.</p> <p>An example using jquery</p> <pre><code>$.post('beingArchive/2012', function(data) { if(data.status === "success"){ window.location.replace("/success"); }else{ $("#error-div").html("&lt;em&gt;Something went wrong!&lt;/em&gt;"); } }); </code></pre> <p>This assumes that your <code>beginArchive</code> method returns json like <code>{"status":"success"}</code> or <code>{"status":"error archiving reason blah"}</code></p> <pre><code> [HttpPost] Public Function beginArchive() As JsonResult Dim status = "success" Try 'do the archiving Catch e As Exception status = "error occurred" End Try Return New Json(New With { _ Key .status = status _ }) End Function </code></pre> <p>(I'm a c# guy so apologies if the vb.net is not right, it's just an example of how I envision the implementation of the action). Unfortunately, without knowing more about what your implementation of "archiving handouts" is, I can't really tell you a good solution for showing the progress of the action would be. But I feel like this is a standard solution that many applications use when processing intensive operations.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload