Populate javascript template at startup global.asax
- by Andrew Florko
Hello, everybody
I use asp.net mvc & going to build javascript files at application startup depending on site configuration.
I am going to have some javascript file templates that will be populated with appropriate constants and put into /scripts folder.
Please, suggest me the best way to do that. I want to have something like:
application_startup()
{
string populatedFile = Html.RenderPartial("/scripts/script.template.js");
write populatedFile into /scripts folder...
}
Thank you in advance !