'Can I output a raw HTML/CSS/JS file using Razor/Razor engine

I am trying to build a character sheet for roll20. While I understand I can use other systems for this, I am trying to learn C# and I figured doing this using C# and Razor would be an interesting challenge.

However, to run on roll20, I need at most a js file, a css file, and an html file. I am trying to find a way to output to files in a specific directory. Is this at all possible and if so how would I do it? I'm trying to investigate this before wasting my time on something that isn't possible, and searching through the internet all describe using a server render, which is not possible with what I'm doing.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source