Auto refresh the page and keep the viewstate of the page

<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.