Catalog · How the catalog works
MVC-Razor-Toolbox
Bootstrap DisplayTemplates, EditorTemplates & util classes for Razor templating engine
- ★ 3 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
MVC-Razor-Toolbox
Bootstrap DisplayTemplates, EditorTemplates & util classes for Razor templating engine
Components
This toolbox provides the following helpers and components:
DisplayTemplates
EditorTemplates
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
debugtotruewill hide the message ifHttpContext.Current.IsDebuggingEnabledisfalse(on a production environment for example).

