ASP.NET MVC View Engine Resolution Sequence

后端 未结 2 1422
不知归路
不知归路 2021-02-14 14:02

I created a simple ASP.NET MVC version 1.0 application. I have a ProductController which has one action Index. In the view, I created a corresponding Index.aspx under Product su

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-14 14:42

    Hmmm... Nope - all due respect webforms doesn't do anything beyond a cache-check when useCache is true. Same as Spark.

    Actually - I think someone might have moved my cheese... Spark might have had a quirk added causing a false cache-miss during the useCache==true pass. If that's true it's more of a bug than different rules applied to that parameter.


    Updated:

    I was looking at MVC 2 originally - which is why I implied @Aaronaught's conclusions were incorrect. MVC 2 does not return a view on the first pass where useCache==true, which is different in MVC 1.0 which will resolve and populate.

    So difference is between the way ASP.NET MVC 1.0 and ASP.NET MVC 2 are implemented. Spark and MVC 2 treat the useCache flag the same, and the order they are registered will give them priority.

提交回复
热议问题