if you are not using script manager in your page then write this line inside if condition..the place where u commented above
Page.RegisterStartupScript("a", "<script language='javascript'>window.confirm('your message');</script>");
hope it helps you
reply me if not works