Auxiliary Saver Technique in Web Forms
As we all know state management is a big deal in web applications. We might have web forms that send important data to the server where might lie some validations in addition to the client side JavaScript validations. General challenge is to restore all the client controls to their previous selections. ViewState use can help, however there are two issues in controling state
1. If you're conservative to keep your page size to low, you may not use ViewState.
2. The controls were built using client side script and/or their data was populated dynamically (such as AJAX or XML DSO etc), these bindings will need to happen once again when page is rendered back after the error or the status check
Is it really needed to Postback when saving data using webforms? Answer is No. Because we can utilize an auxilliary "form saver" page/handler that will be posted data from the client using XMLHTTP asynchronously, and whenever it finishes processing, it can return back the XML as a response metadata. This XML response will tell whether the operation to save form data succeeded or not. Also we can customize it to return some status codes (may be used to redirect after saving data etc) and meta language to perform post-save processing on the client side using JavaScript.