Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Display alert

$
0
0

I am trying to display alert message depending on recCnt value as below:

ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "alertMsg", "SaveAlert('" + recCnt + "')", true);

JS:

function SaveAlert(rst) {
if (rst == '-1')
alert('Selected Item already there in your Favorite list');
else if (rst == '-2')
alert('Selected Item already there in your Blocked list');
else
alert('Record Saved Successfully');
}

Though it's displaying message fine but sometimes it displays message and sometimes not. Moreover, it completely blackens background. What can be the best way to display alert? 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>