ASP.NET server side show JS Alert box, doesn't work when using partial post back.

Posted by jamone on Stack Overflow See other posts from Stack Overflow or by jamone
Published on 2010-03-24T18:21:51Z Indexed on 2010/03/24 18:23 UTC
Read the original article Hit count: 275

Filed under:
|
|

I have put the following method in my master page. It works when I call it on a full post back, but when I call it from a updatePanel's asyncPostBack no alert is shown.

    public void ShowAlertMessage(String message)
    {
        string alertScript = 
            String.Format("alert('{0}');", message);
        Page.ClientScript.RegisterStartupScript(this.GetType(), "Key", alertScript, true);
    }

What do I need to do so it works on partial post backs?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript