mvc 扩展htmlhelper

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 "未知";
            }
        }
    }
}

posted @ 2016-03-02 11:21  caijinhao  阅读(144)  评论(0编辑  收藏  举报