menu is disordered when javascript executes
<p>I am working on a ASP.NET application using .NET framework 4.0</p>

<p>I want to display javascript alerts when some code on the server finishes executing.</p>

<p>for example:</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
{
    NewAllocation.getSettings();
    NewAllocation.populateParentFundTable(FundNameTextBox.Text, RemarksTextBox.Text, Decimal.Parse(AmountTextBox.Text), DateTime.Parse(DateTextBox.Text), Decimal.Parse(SurplusTextBox.Text));
    ClientScript.RegisterStartupScript(GetType(),"key","alert(\"New fund allocation successful\");",true);
}
</code></pre>

<p>I am calling the javascript code like this because <strong>the javascript alert should only execute after the c# code in the button handler completes</strong>.</p>

<p>The problem is, when the javascript alert executes, my menu gets disordered.</p>

<p><img src="http://i.stack.imgur.com/nBXja.png" alt="enter image description here"></p>

<p>Whereas before clicking the button it was like this:<br /><br /></p>

<p><img src="http://i.stack.imgur.com/NFDJR.png" alt="enter image description here"></p>

<p><br /><br /><br /><strong>My menu was designed in a master page using ASP.NET menu controls.</strong></p>

<p>How to solve the menu disorder problem?</p>
