开发者

Can you make Asp.net MVC View wireup compile time safe?

Take 开发者_如何学Cthe standard return statement for a controller:

return View("Index");

is there a way to make this thing compile time safe? using static reflection or some other trick?


Yes; you're looking for this.

T4MVC is a T4 template for ASP.NET MVC apps that creates strongly typed helpers that eliminate the use of literal strings when referring to controllers, actions and views. It helps make your MVC code much more maintainable, and gives you intellisense where you normally would not have any.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜