In the introduction to Razor on ScottGu's blog, he mentioned placing the @helper
s inside Views\Helpers
. I tried doing so in the RC and after a lot of searching, I found out that the helpers should be in the App_Code
folder. I don't need my helpers in another assembly (especially if they're specific to this project), and having them way up in the App_Code
seems ugly IMO. Is there a current solution to have the these helpers inside a View\Helpers
folder?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I am afraid they didn't yet implement this feature yet, at least not in the RC build.
回答2:
Now we have detailed blog post on this issue at first-hand by Scott Gu
ASP.NET MVC 3 and the @helper syntax within Razor