当我尝试执行此操作时,不加载警报消息,它会立即导航到 homeNew.aspx 页面。但是当重定向代码不可用时,警报消息会正确弹出......我需要这两个功能,这意味着在单击“确定”到警报消息后它应该被重定向到下一页..请帮助我克服这个问题问题。
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>");
}