Using a Razor @functions in several webpages (.cshtml files)

前端 未结 3 422
孤独总比滥情好
孤独总比滥情好 2020-12-03 14:13

I have the below function that I would like to be available to several .cshtml views in my asp.net web pages 2 application. How can I make this function available to any vie

3条回答
  •  Happy的楠姐
    2020-12-03 14:28

    Don't see why you couldn't have a static class with a static method and just include it at the top of every view and then use it

提交回复
热议问题