I want to be able to check the form inputs prior to launching a long running asynchronous task.
Two approaches that come to mind:
- Check values on the Begin method and throw an exception?
- Post to a normal (synchronous method) which validates as per normal. redirects to the asynchonrous method if no errors found.
Throwing an exception i thought would be a simple solution. I can't return the view from the begin method, so the exception is handled on the end method. Only it isn't getting across to the end method (I thought this was the normal pattern)
Validating in a normal synchronous method is fine... but how do i transfer or redirect the request to the asynchronous method???