<Body onload="setTimeout('formname.submit();', 300000);">
<form id="formname" method="post" runat="server">
Here this JavaScript method “setTimeout()” will submit your form data after every 5 minutes and the page will also get refreshed so that it will also persist the view-state of the page after auto refresh of the page.
Auto refresh the page and keep the viewstate of the page
This Blog tell you how to autorefresh a page as well how keep the view-state of the page. To achieve this I have put a simple JavaScript code on BODY tag of my page as below:


Join the conversation! Your thoughts help the community grow.