public SweetAlert Type(SweetAlertType type) { if (type != SweetAlertType.Default) { Attributes["type"] = string.Format("'{0}'", type.ToString().ToLower()); } SetScript(); return(this); }
/// <summary> /// Display a message /// </summary> /// <param name="title">The modal header title</param> /// <param name="message">The message to be displayed</param> /// <param name="messageType">Define the icon to be used</param> /// <returns>Operation result</returns> public async ValueTask DoDisplayMessage(string title, string message, SweetAlertType messageType) { await js.InvokeVoidAsync("Swal.fire", title, message, messageType.ToString()); }
public void SweetAlert(string message, SweetAlertType notificationType) { var msg = "swal('" + notificationType.ToString().ToUpper() + "', '" + message + "','" + notificationType + "')" + ""; TempData["notification"] = msg; }