You can use SweetAlert to trigger by the controller
First off all create a Asp.NET MVC project and install SweetAlert from Nuget Package Manager
Install-Package SweetAlert.Bootstrap -Version 1.0.1
And use this class
SweetAlertHelper.cs
ViewBag.SweetAlertShowMessage = SweetAlertHelper.ShowMessage("Error", "Username or Password Wrong", SweetAlertMessageType.error);
@section scripts{
<script type="text/javascript">
@Html.Raw(ViewBag.SweetAlertShowMessage)
</script>
}
.Net Framework 4.5.2
- SweetAlert - A beautiful replacement for success messages
- Sertunc SELEN - Initial work
This project is licensed under The FreeType License (FTL)