hi
i have a class library class(.cs) file
i would like to check a condition
depending on the condition if condition is met i would like to display an alert message otherwise else part to be executed
i have written some code
but no effect
if (condition)
{
string popupScript = "<script language='javascript'>" + "window.alert('Message'); </script>";
Page.RegisterStartupScript("PopupScript", popupScript);
//HttpContext.Current.Response.Write("<script>var agree =alert('Message');</script>");
//HttpContext.Current.Response.Write("<script>alert('Message')</script>");
}
else
{
do something
}
is this correct or please suggest someother solution
thanks