Javascript Alert() and post back in c#

  • Thread starter Thread starter PH
  • Start date Start date
P

PH

Does anyone know how to have the pop-up javascript alert,

Response.Write("<script language=javascript>alert('HEY!');</script>);

, pop-up after the page has been posted back? I am pressing a button,
validating data and then wanting to simply pop-up an alert if say the
login is empty. When I click the button though the page is blank but
the pop-up is there.
 
Hi...

Page.RegisterStartupScript
("_errorMessage","<script>window.alert('Error');</script>");
 
Back
Top