So I\'m trying to create a custom editor so that for a DataType
of \"Duration\" a textbox appears with a masked format of HH:MM:SS.
I\'ve created a very
You can create singleton class with Dictionary property whic will store scripts from your custom helpers/templates. In your templates you can call method, that put script in singleton dictionary property with some string key. In that method you can prevent adding scripts with same keys.
Finally you should to write a render action for rendering scripts from dictionary and call this action from your master layout.
Here you can find solution similar to mine:
Managing Scripts for Razor Partial Views and Templates in ASP.NET MVC