The code that is executing here is on the server side. Your Response.Write is sending HTML JavaScript code to the browser and the complete rest of your code inside the imgLogin_Click method is executed before the alert box is even displayed in the browser. This immediately brings my attention to a problem here:
Since Response.Redirect adds information to the HTTP headers it usually leads to an error when trying to Redirect the Reponse when one has already written to the stream. What you probably want is placing some code after the alert("..."); call that will make the browser navigate to your Index.asp like
window.location.assign(url)[
^].
Response.Write("<script language='javascript'>alert('Thank you for contacting us. We will get back to you shortly'); window.location.assign('http://you.domain.xx/path/Index.asp');</script>")
Regards,
— Manfred