When I tried to execute this, without loading the alert message, straight away it navigates to homeNew.aspx page. But when the redirection code is not available, the alert message is popping up correctly... I need both function that means after clicking "ok" to the alert message It should be redirected to next page.. Please help me to overcome from this problem.
if (TextBox2.Text == nic)
{
Response.Write(@"<script language='javascript'>alert('Check your email to retrieve your user name and password!')</script>");
Response.Redirect("homeNew.aspx");
connection.Close();
}
else
{
Response.Write(@"<script language='javascript'>alert('INVALID Email address and NIC combination, Try Again!')</script>");
}