5 Feb 17
It's a piece of Razor code that you can call from multiple locations on your page.
Here's an example:
Create this at the top of your page.
@Helper ShowWarning(ByVal warningText As String) <span class="warning"> @warningText </span> End Helper
To reference this from anywhere within the page.
@ShowWarning("Oh No! There has been an error")
If you feel that this code will be useful enough to use across all your views you can create a global helper. To do this:
You have now made your helper globally accessible.
You will need to make a slight change to your code that calls the helpers now:
@dwHelper.ShowWarning("Oh No! There has been an error")