Is it possible to use the asp templating engine (With the partial code-behind class, dynamic <% ... %> blocks and such) to generate non HTML? I want to have a clean and maintainable way to generate code dynamically. (Specifically, I want to generate LaTeX code populated with values from a database.)
Currently my LaTeX templates are resource strings with placeholders that I string.replace with the database values. This solution rapidly became very difficult to maintain and clean. I'd really like to use the dynamic blocks from aspx markup, but I'm not sure a) whether aspx will throw a fit when the output isn't HTML, or b) how to actually render the result into a .tex file.
The generating code itself is located in a C# .dll. We're using .NET 3.5
Is this possible? Thanks in advance.