Extension Method and Razor Page

前端 未结 3 1517
抹茶落季
抹茶落季 2021-01-13 14:39

I have defined an extension method in app_code like below.

public static class Extensions
{
    public static string Hi(this object obj)
    {
        return         


        
3条回答
  •  梦谈多话
    2021-01-13 14:56

    Just like a normal scenario you have to include it in a using. the razor syntaz is

    @using Namespace.Namespace
    

提交回复
热议问题