0

I want use *.html to instead *.cshtml in asp.net mvc.

Is there any way to solve? what do i do?

Rwing
  • 490
  • 4
  • 19
  • 1
    Why do you want to do that? The razor view is rendered into a html by the framework, but you cannot use the razor view directly like 'http://yoursite/yourrazorview.cshtml'. – Nilesh Mar 18 '14 at 03:54
  • You will need to [write your own view engine](http://www.codeproject.com/Articles/294297/Creating-your-own-MVC-View-Engine-into-MVC-Applica). – Rowan Freeman Mar 18 '14 at 04:29
  • You can also just write html code in the cshtml file. There is no requirement to have c# or Razor code in the file. – Adam Zuckerman Mar 18 '14 at 05:07
  • 1
    Asked and answered here: http://stackoverflow.com/questions/5110970/can-i-serve-html-files-using-razor-as-if-they-were-cshtml-files-without-changi – Mike Brind Mar 18 '14 at 07:54

0 Answers0