The Messagebox code in c# i’ve used is the following code,which is call conditionally based on my requirement.It works fine in all cases except when the Ajax update panel is used.
For example i would like to prompt the user if no check box is selected in a gridview,with
appropriate message,The code is executed but no message box is displayed
public static void MessageBox(string message, Page page)
{
if (!string.IsNullOrEmpty(message))
{
Label lbl = new Label();
lbl.Text = "<script type=\"text/javascript\" language=\"javascript\">" + "alert('" + message + "'); " + "</script>";
page.Controls.Add(lbl);
}
}
You could do as suggested here