开发者

How i can render Razor view when ASPX file not found?

开发者 https://www.devze.com 2023-03-05 20:31 出处:网络
i have a project built in MVC 2 [ASPX] and i upgrade them to 3. i make the project\'s view in Razor cshtml.

i have a project built in MVC 2 [ASPX] and i upgrade them to 3. i make the project's view in Razor cshtml.

because project have a theme system they already have some theme built in ASPX and mine theme in R开发者_运维知识库azor.

suppose action call time.ascx then if file not found how i can render time.cshtml instead of that file they actuall call.


This will happen automatically.

When you return a view or partial view name, MVC will search all registered ViewEngines for a matching view.

0

精彩评论

暂无评论...
验证码 换一张
取 消