Show Javascript messgae and when click ok then redirect to another page


 public static void ShowMsgWithRedirect(System.Web.UI.Page objPage, string msg, string pagename)
    {
        ScriptManager.RegisterStartupScript(objPage, objPage.GetType(), "", "alert('" + msg + "');window.location ='" + pagename + "';", true);
    }

    public static void ShowMessage(System.Web.UI.Page objPage, string msg)
    {
        ScriptManager.RegisterStartupScript(objPage, objPage.GetType(), "", "alert('" + msg + "');", true);
    }
    public static void ShowConMessage(System.Web.UI.Page objPage, string msg)
    {
        ScriptManager.RegisterStartupScript(objPage, objPage.GetType(), "", "Confirm('" + msg + "');", true);
    }

Comments

Popular posts from this blog

How to find client's MAC Address in Asp.Net and C#.net

ASP.NET Session States in SQL Server Mode

Use XML Data For Save in Database