Tilde Slash Paths Not Working in MVC 4

前端 未结 8 561
逝去的感伤
逝去的感伤 2021-01-12 01:10

As I understand it, a plain ol\' \"~/foo\" path is supposed to work like @Url.Content(\"~/\") in MVC 4. However, I\'m trying to do this and getting many broken paths -- the

8条回答
  •  误落风尘
    2021-01-12 02:05

    My guess is that you are still running Razor 1 (MvcWebRazorHostFactory is < 4.0).

    Verify the web.config in your Views folder looks like this...

     
        
          

提交回复
热议问题