Posted on 07/02/2018 13:39:22
Hi Imar
This is what the docs written by the developer (that was me) says on the TFS item:
- Create VS project with MVC support (i.e. use Rapido)
- In the root of the project, create a app_code folder
- Add a cshtml file with helpers, see attachment
- In a layout or master file (or any other razor template) add this statement @Include("../../../App_Code/MyCustomHelpers.cshtml", "MyCustomHelpers")
- Check that the helpers will be seen by intellisense in vs and executed on the server by doing like this:
- @MyCustomHelpers.HelperName("asdf")
- @MyCustomHelpers.something()
I do remember that it was a problem to get this to work - but I think this fixed it...
BR Nicolai