How to execute a script after the csharp function executed

Code Example - How to execute a script after the csharp function executed

                
                        BY LOVE,  At the place of swal , you can use alert() function also.

int NumberOfRows = oRSEntities.Menu_Item.Count();
string message = %%%~COMPRESS~PRE~0~%%%quot; {NumberOfRows} Records saved successfully.";
string script = "window.onload = function(){ swal('";
script += message;
script += "')};";
ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);