SWMNU.Net.FlashMessage 1.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package SWMNU.Net.FlashMessage --version 1.0.3
NuGet\Install-Package SWMNU.Net.FlashMessage -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SWMNU.Net.FlashMessage" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SWMNU.Net.FlashMessage --version 1.0.3
#r "nuget: SWMNU.Net.FlashMessage, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SWMNU.Net.FlashMessage as a Cake Addin
#addin nuget:?package=SWMNU.Net.FlashMessage&version=1.0.3

// Install SWMNU.Net.FlashMessage as a Cake Tool
#tool nuget:?package=SWMNU.Net.FlashMessage&version=1.0.3

Flash Messages for ASP.NET 5 and Core 3.1

Description

This is a Razor Class Library that provides a means to display Flash Messages in an ASP.NET 5 or Core 3.1 web application. (Razor Pages and MVC are supported.)

It depends on and utilizes Twitter Bootstrap for the alert CSS and HTML.

Currently, Bootstrap 4.6 and Bootstrap 5 are supported.

Check out the Wiki to get started!

Download

You can grab this package from NuGet or by going to the Releases of this repo.

What's a Flash Message?

A Flash Message can be thought of as a one time notification.

Perhaps a Welcome message after you sign up for a web site. Or an error notification indicating that an action has failed. They're meant to be seen once and never again.

How it works

In a nutshell, this library exports functions and a few Razor View Partials that work in tandem to display a Flash Message or a Form Alert using TempData and Bootstrap 4 for the Alert styling.

By using TempData, the flash message is only shown once. A refresh or reload will cause the message to disappear.

Requirements

  1. An ASP.NET 5 or Core 3.1 Web App. Razor Pages and/or MVC supported.
  2. Bootstrap 4.6 or Bootstrap 5.1.

Example Apps

The BS4.FlashMessage.TestingApp and BS5.FlashMessage.TestingApp folders contain ASP.NET 5 Web Apps that show off the Flash Message and Form Alert features. They contain both Razor Pages and MVC Examples.

The BS4 app uses Bootstrap 4.6.x and the BS5 app uses Bootstrap 5.1.x

The example apps utilize Swashbuckle.AspNetCore (located at https://localhost:5001/swagger/) to show the MVC endpoints currently mapped.

They also utilize Serilog.AspNetCore for better logging all around.

Running the Example Apps

  1. Change directory to either one of the example apps.
  2. Execute dotnet run

LICENSE

This project is licensed under the MIT License.

Contact

You can contact me at robertcato015 at gmail dot com, if you have any questions!

Or feel free to open up an issue or pull request!

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 1,071 12/18/2022
1.0.5 320 11/2/2022
1.0.4 405 9/23/2021
1.0.3 275 8/6/2021
1.0.2 561 5/3/2020
1.0.1-alpha 302 5/2/2020