scriptmanager.registerstartupscript not working on scriptManager.RegisterPostBackControl buttonclick
<p>Actually I wanted to display the Loading message when I m fetching data from backend and putting in .CSV file, when I was using HttpContext, I was getting error - </p>

<pre><code>Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
</code></pre>

<p>To avoid the above error I wrote the script in the PageLoad(see below),and now I m not getting the above error but the hide() is not working. I have given the code below.</p>

<p><strong>CODE</strong>:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
   ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
   scriptManager.RegisterPostBackControl(this.btnDownloadReport1);
}

protected void btnDownloadReport_OnClick(object sender, EventArgs e)
{
    GetPCNMEReportInCSV();
    ScriptManager.RegisterStartupScript(this, typeof(string), "script", "$('.loading').hide();", true);
}
</code></pre>
