Why I can't hide message after shows once in postback?
<p>I have masterpage and its inherit pages. In masterpage I have a literal and i am displaying messages by conditions. In inherit pages I'm creating these messages with stringbuilder.<br /></p>

<pre><code>literal.Text = "&lt;div id=\"alertWarning\" style=\"display:none; color:#fff; text-align:center; padding: 8px 10px 9px; width:auto; position:relative; background:#C79810;\"&gt;&lt;h3&gt;" + title + "&lt;/h3&gt;&lt;p&gt;" + error + "&lt;/p&gt;&lt;/div&gt;";

            StringBuilder sb = new StringBuilder();
            sb.Append("$(function() { ");
            sb.Append(" $('#alertWarning').toggle({");
            sb.Append("    width: 400");
            sb.Append(" });");
            sb.Append("});");
            sb.Append("$('html, body').animate({ scrollTop : 0 }, '500');");

            if (HttpContext.Current.CurrentHandler is Page)
            {
                Page pa = (Page)HttpContext.Current.CurrentHandler;

                if (ScriptManager.GetCurrent(pa) != null)
                {
                    ScriptManager.RegisterStartupScript(pa, typeof(Page), "alert", sb.ToString(), true);
                }
                else
                {
                    pa.ClientScript.RegisterClientScriptBlock(typeof(Page), "alert", sb.ToString(), true);
                }
            }
</code></pre>

<p><br />
In masterpage I have this script to autohide display message.</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function pageLoad(sender, args) {
            setTimeout(function () { $("#alertError").toggle("close"); }, 5000);
            setTimeout(function () { $("#alertSuccess").toggle("close"); }, 2000);
            setTimeout(function () { $("#alertWarning").toggle("close"); }, 3000);
        };
    &lt;/script&gt;
</code></pre>

<p><br />
But if the page postback that display message displaying again. Is it possible to display it just one time?</p>
