开发者

Custom Template Controls: .ascx or vbhtml

Does anyone have any recommendations about using a .ascx file (user control) versus a .vbhtml/.cshtml (razor) for custom templates? It would appear from my limited interaction that they are completely interchangeable.

Is it purely a matter of co开发者_Go百科mfort/experience or are there pros and cons to each method?

Thanks


Yes, they are interchangeable. But if your main application uses Razor I would recommend you using Razor for those templates. Unless you have some legacy code from some older ASP.NET MVC 2 application that you want to reuse. For all new views I recommend Razor.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜