Skip to content

You can use it to trigger the sweetalert message by the controller

Notifications You must be signed in to change notification settings

sertunc/SweetAlertForMVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SweetAlertForMVC

You can use SweetAlert to trigger by the controller

Getting Started

First off all create a Asp.NET MVC project and install SweetAlert from Nuget Package Manager

Installing

Install-Package SweetAlert.Bootstrap -Version 1.0.1

And use this class

SweetAlertHelper.cs

Running the example

Controller Side

ViewBag.SweetAlertShowMessage = SweetAlertHelper.ShowMessage("Error", "Username or Password Wrong", SweetAlertMessageType.error);

Markup Side

@section scripts{
    <script type="text/javascript">
        @Html.Raw(ViewBag.SweetAlertShowMessage)
    </script>
}

Deployment

.Net Framework 4.5.2

Built With

  • SweetAlert - A beautiful replacement for success messages

Authors

  • Sertunc SELEN - Initial work

License

This project is licensed under The FreeType License (FTL)

About

You can use it to trigger the sweetalert message by the controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published