I\'m using vs 2010. I need to display the message to user and redirect the page.
I use the below line.
ScriptManager.RegisterStartupScript(this, this
If you are Working with UpdatePanel then You have to use this : It is work with Update Panel.
var message = new System.Web.Script.Serialization.JavaScriptSerializer().Serialize("Bill No. : " + BillNo + " successfully generated.");
var script = string.Format("alert({0});window.location ='ChhallanPrint.aspx';", message);
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", script, true);