mvc 扩展htmlhelper

时间:2021-07-07 08:25:21

using System.Web.Mvc;

namespace System.Web.Mvc
{
    public static class HtmlExtend
    {
        public static string IsDelete(this HtmlHelper helper, int? txt)
        {
            switch (txt)
            {
                case 0: { return "可用"; }
                case 1: { return "不可用"; }
                default:
                    return "未知";
            }
        }
    }
}