September 2016
Beginner to intermediate
186 pages
3h 28m
English
Self-closing helpers are helpers that can contain HTML and Razor markup. The built-in @Html.BeginForm() helper is an example of this helper type.
In order to create this type of HTML Helper, we'll need to create a helper class that implements the IDisposable interface. Using the IDisposable interface, we can write the element's closing tags when the object is disposed.
The Bootstrap Alert component is a good candidate for such a helper. To create the helper, we'll have to complete the following steps:
Alerts inside the Helpers folder in your project.Enums.cs file and add a new item called AlertStyle: public enum AlertStyle { Default, Primary, Success, ...Read now
Unlock full access