“ASP.global_asax does not exist in the namespace ASP”

后端 未结 9 2258
梦毁少年i
梦毁少年i 2020-12-23 08:56

I created a RazorFunctions.cshtml file on App_Code

@functions {
    public static string GetActiveClassIf(string controllerName, string actionName = null)
           


        
9条回答
  •  别那么骄傲
    2020-12-23 09:54

    The way I resolved this error was to move my code form Global.asax.cs into Startup.cs and delete Global.asax so that there aren't any codebehind files in my project. See this question for more info.

提交回复
热议问题