Conditional Compilation is turned off in Razor?

后端 未结 4 1026
清歌不尽
清歌不尽 2020-12-04 01:14

I\'ve got a c# foreach loop that Is outputting some javascript to initialize some progress bars on my razor view.

@foreach (var item3 in Model)
{
    @:$(\"         


        
4条回答
  •  攒了一身酷
    2020-12-04 01:54

    I thought I would share what worked for me,

    I had this same issue : System.Web.HttpCompileException (0x80004005)

    below the exception I get: The name 'Url' does not exist

    When I looked at the View I noticed the only place that was using Url was the razor code @Url.

    This post talked about the references to razor and MVC.

    When i looked in the Views folder in the solution there was a web.config file that contained all the references however it was renamed web.src.config. As soon as I changed it to web.config I was up and running again.

提交回复
热议问题