Populate javascript template at startup global.asax
Posted
by Andrew Florko
on Stack Overflow
See other posts from Stack Overflow
or by Andrew Florko
Published on 2010-04-04T06:35:36Z
Indexed on
2010/04/04
6:53 UTC
Read the original article
Hit count: 427
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 !
© Stack Overflow or respective owner