Use razor/asp.net mvc3 to generate static html pages?

后端 未结 7 1673
一整个雨季
一整个雨季 2020-12-29 05:55

For one projet, I\'ve to generate static .html pages, which are gonna to be published on a remote server.

I\'ve to automate the creation of those files from a c# cod

7条回答
  •  盖世英雄少女心
    2020-12-29 06:20

    1. Yes it is. Even when you can cache the results, HTML pages will be always faster and use lower server resources
    2. A good way is to transform your razor views into text and then save the text as a html file.
    3. Another way can be using T4 templates, but I recommend Razor.

提交回复
热议问题