RolePermission.Common/HtmlHelpers/RadioButtonListHelper.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//using System;
//using System.Collections.Generic;
//using System.Linq.Expressions;
//using System.Text;
//using Microsoft.AspNetCore.Mvc.Rendering;
//using Microsoft.AspNetCore.Mvc.ViewFeatures;
//using Microsoft.AspNetCore.Mvc.ViewFeatures.Internal;
//
//namespace RolePermission.Common.HtmlHelpers
//{
// public static class RadioButtonListHelper
// {
// /// <summary>
// /// Radio列表
// /// </summary>
// /// <param name="htmlHelper">辅助类</param>
// /// <param name="selectList">集合</param>
// /// <param name="htmlAttributes">html标签</param>
// /// <param name="isChecked">默认单选状态</param>
// /// <returns></returns>
// public static MvcHtmlString RadioButtonListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<SelectListItem> selectList, object htmlAttributes, bool isChecked = false)
// {
// string name = ExpressionHelper.GetExpressionText(expression);
// return RadioButtonList(htmlHelper, name, selectList, htmlAttributes, isChecked);
// }
// /// <summary>
// /// Radio列表
// /// </summary>
// /// <param name="htmlHelper">辅助类</param>
// /// <param name="selectList">集合</param>
// /// <param name="isChecked">默认单选状态</param>
// /// <returns></returns>
// public static MvcHtmlString RadioButtonListFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, IEnumerable<SelectListItem> selectList, bool isChecked = false)
// {
// string name = ExpressionHelper.GetExpressionText(expression);
// return RadioButtonList(htmlHelper, name, selectList, new { }, isChecked);
// }
//
// /// <summary>
// /// Radio列表
// /// </summary>
// /// <param name="htmlHelper">辅助类</param>
// /// <param name="name">字段名称</param>
// /// <param name="selectList">集合</param>
// /// <param name="htmlAttributes">html标签</param>
// /// <param name="isChecked">默认单选状态</param>
// /// <returns></returns>
// public static MvcHtmlString RadioButtonList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem> selectList, object htmlAttributes, bool isChecked = false)
// {
// IDictionary<string, object> HtmlAttributes = HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes);
// string defaultValue = string.Empty;
// if (htmlHelper.ViewData.Model != null)
// {
// if (!string.IsNullOrWhiteSpace(name))
// {
// defaultValue = htmlHelper.ViewData.Eval(name).GetString();
//
// }
// isChecked = false;
// }
后面还有 29 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。