you cant wait on the server like that. Once you navigate to the page the execution will go back to the client side