Razor @helper in App_Code cannot be accessed
In my App_code , I have a helper function called FormatTelephone(string number) in Formatter.cshtml . I tried to access it in a partial view by @Formatter.FormatTelephone(number) . When I test it, it says Compiler Error Message: CS0103: The name 'Formatter' does not exist in the current context What is the likely cause of it? Thanks! I ran into this exact problem when deploying the site onto another server. Make sure the App_Code/Formatter.cshtml file is actually copied to the server! My mistake was the file has a build action that was set to ' None '. Right click on the file and select