I believe the issue is in your script tag. You need to specify the language as javascript. You also need to put a semicolon at the end of your javascript line. The result should look like this (ignore the double-quotes around javascript - it is a bug in the CP editor that I can't get around):
if (projectID != "0")
{
Response.Redirect("ProjectDetails.aspx");
}
if (projectID == "0")
{
Response.Write("<script language='javascript'>alert('Please Select');</script>");
}
Here is a MSDN question with more information and help:
http://forums.asp.net/t/1051178.aspx/1[
^]