You can this code in asp button
OnClientClick="return confirm('thank you for registering and do u wish to login now?')"
if user clicks yes then it returns true and server event executes then redirect to your respective.aspx in button_click event.
Or if you want to do it by JavaScript itself then call
OnClientClick="fnConfirm()"
function fnConfirm() {
if (confirm('thank you for registering and do u wish to login now?')) {
window.location = "http://www.your-new-location.com/respective.aspx";
}
else {
return false;
}
}