Where should I locate shared @helper functions in MVC Razor

后端 未结 1 1113
天命终不由人
天命终不由人 2021-02-03 17:47

I have a helper function that turns minutes into hours/mins. I currently have it in my layout.cshtml but each page cannot see the function. Where should I put the helper funct

1条回答
  •  [愿得一人]
    2021-02-03 18:20

    You should put it into the App_Code folder. There is an awesome article for you to read ASP.NET MVC Helpers

    0 讨论(0)
提交回复
热议问题