 <p>Directly, you need AJAX. </p> <p>Without AJAX, you can split the logic in two parts. Make a function of the logic that you want to run in back ground. And when the page gets loaded, do a postback to that function via JS.</p>