Monday, September 30, 2013

Little Programming: ASP.NET C# Popup MessageBox

Little Programming: ASP.NET C# Popup MessageBox:

 public static void ShowAlertMessage(string error)
        {
            Page page = HttpContext.Current.Handler as Page;
            if (page != null)
            {
                error = error.Replace("'", "\'");

                ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "alert('" + error + "');", true);
            }
        }

No comments:

Post a Comment