Skip to content

chteuchteu/MVC-Razor-Toolbox

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 
 
 
 
 

MVC-Razor-Toolbox

Bootstrap DisplayTemplates, EditorTemplates & util classes for Razor templating engine

Components

This toolbox provides the following helpers and components:

DisplayTemplates

Read doc/DisplayTemplates.md

EditorTemplates

Read doc/EditorTemplates.md

FlashMessage

Displays confirmation/warning/error/debug messages the next time a view is rendered:

  • Directly from the same controller action
  • After a redirect

It internally makes use of the TempData special object.

Include _FlashMessages.cshtml in your view, and use FlashMessage.Flash(TempData, new FlashMessage(message, type, title)) in your controller: the message will be shown in the view the next time it is rendered.

Constructor:

FlashMessage(string message, FlashMessageType type = FlashMessageType.Success, string title = null, bool debug = false)

Note: setting debug to true will hide the message if HttpContext.Current.IsDebuggingEnabled is false (on a production environment for example).

About

Bootstrap DisplayTemplates, EditorTemplates & util classes for Razor templating engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published