Display (Show) Success Message after Record Inserted (Form Submit) in ASP.NET

HTML Markup

The following HTML Markup consists of a standard form with some fields and a Button to submit the form and insert the data into database. 
  1. <table border="0" cellpadding="0" cellspacing="0">  
  2.     <tr>  
  3.         <td> Name: </td>  
  4.         <td>  
  5.             <asp:TextBox ID="txtName" runat="server" /> </td>  
  6.     </tr>  
  7.     <tr>  
  8.         <td> City: </td>  
  9.         <td>  
  10.             <asp:TextBox ID="txtCity" runat="server" /> </td>  
  11.     </tr>  
  12.     <tr>  
  13.         <td> Country: </td>  
  14.         <td>  
  15.             <asp:TextBox ID="txtCountry" runat="server" /> </td>  
  16.     </tr>  
  17.     <tr>  
  18.         <td> </td>  
  19.         <td>  
  20.             <asp:Button ID="btnSave" Text="Save" runat="server" OnClick="Save" /> </td>  
  21.     </tr>  
  22. </table>  
C# 
  1. protected void Save(object sender, EventArgs e)  
  2. {  
  3.     //Insert record here.  
  4.     //Display success message.  
  5.     string message = "Your details have been saved successfully.";  
  6.     string script = "window.onload = function(){ alert('";  
  7.     script += message;  
  8.     script += "')};";  
  9.     ClientScript.RegisterStartupScript(this.GetType(), "SuccessMessage", script, true);  
  10. }