Tag: view helpers

无法访问App_Code中的Razor @helper

在我的App_code ,我在Formatter.cshtml有一个名为FormatTelephone(string number)的辅助函数。 我试图通过@Formatter.FormatTelephone(number)在局部视图中访问它。 当我测试它时,它说 编译器错误消息:CS0103:当前上下文中不存在名称“Formatter” 可能的原因是什么? 谢谢!