/// <summary>
 /// Method to show info message on the screen.
 /// If you want to call this js script multiple times at the same time, please pass unique key name for each call.
 /// </summary>
 /// <param name="message"></param>
 /// <param name="title"></param>
 /// <param name="type"></param>
 /// <param name="key"></param>
 public void ShowNotificationDialog(string message, string title, CommonEnums.NotificationTypes type = CommonEnums.NotificationTypes.None, string key = "__notificationMsg")
 {
     if (!message.IsNullOrWhiteSpace())
     {
         string script = ScriptHelper.GetNotificationDialogScript(message, title, type);
         if (!ClientScript.IsStartupScriptRegistered(key))
         {
             System.Web.UI.ScriptManager.RegisterStartupScript(this.Page, GetType(), key, script, true);
         }
     }
 }
Пример #2
0
        /// <summary>
        /// Method to get script to show notification in front end.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="title"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string GetNotificationDialogScript(string message, string title, CommonEnums.NotificationTypes type = CommonEnums.NotificationTypes.None)
        {
            string script = String.Format(ScriptResources.SHOW_NOTIFICATION_DIALOG_SCRIPT, message, title, type.ToString());

            return(ScriptWithDocumentReadyFunction(script));
        }