Good Evening Guys, Today its my Birthaday.

I have a If statement that i use to return an integer that will mean Success or Failure , now am testing for that integer in my ASP.NET 2.0 Page lke this

if (Res == 1)

 Response.Write("<script> alert('You have Successfully Registred');</script>");

 Response.Redirect("login.aspx", false);

Response.Write("<script> alert('Invalid Data has been Entered');</script>");


Now if the value is 1, then it should Display the Message and after the Message has been Clicked it should move to the login Page. Now my Problem is that it moves to the Login Page without a Alert Message being Displayed And the send Alert for invalid Entry, will not show anythingm, there is a Warning sign on my Page at the Bootom left of my Page. What is wrong with my Javascript


the methodu u used is obselete in case of 2.0 ,u should javascript like this

ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script> alert('Machine Details Added Successfully!'); </script>");