StringBuilder stringBuilder = new StringBuilder();
stringBuilder.AppendLine("<script>");
//First wait until the SP.js is loaded, otherwise the notification doesn’t work
//gets an null reference exception
stringBuilder.AppendLine("ExecuteOrDelayUntilScriptLoaded(ShowNotification, \"sp.js\");");
stringBuilder.AppendLine("ExecuteOrDelayUntilScriptLoaded(ShowStatusNotification, \"sp.js\");");
stringBuilder.AppendLine("function ShowNotification()");
stringBuilder.AppendLine("{");
stringBuilder.AppendLine(string.Format("SP.UI.Notify.addNotification(\"{0}\");", "Save sucessful"));
stringBuilder.AppendLine("}");
stringBuilder.AppendLine("function ShowStatusNotification()");
stringBuilder.AppendLine("{");
stringBuilder.AppendLine(" var strStatusID = SP.UI.Status.addStatus(\"Information : \", \"<img src='/_Layouts/Images/STS_ListItem_43216.gif' align='absmiddle'> <font color='#AA0000'>Save successful.</font>\", true);");
stringBuilder.AppendLine("SP.UI.Status.setStatusPriColor(strStatusID, \"yellow\");");
stringBuilder.AppendLine("}");
stringBuilder.AppendLine("</script>");
//add to the page
Page.Controls.Add(new LiteralControl(stringBuilder.ToString()));