Working on a project where I simply need to generate a random number using NVelocity in a page without editing the code behind C#. I'm new to NVelocity and I've looked all over the interwebs but cant't find the answer.
Any help is appreciated.
NOTE: To the user who marked this as a possible duplicate question. I've tried to adapt the Velcocity/Java solution listed in that answer to fit NVelocity/C# with no luck. I was under the assumption the answer would be different.
NVelocity doesn't have built-in support for generating pseudo-random numbers, however if you create a new
System.Randomand add it to theVelocityContextyou'll be able to access it from the template.