一、checkbox传值:通过Name属性值获取 用户选中的项数据,会序列化成数组形式传递
后台代码:
二、MVC5的权限验证AuthorizeAttribute
using Microsoft.Ajax.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Helpers;
using System.Web.Management;
using System.Web.Mvc;
namespace RM_MVC._2020._10._21.Models
{
/// <summary>
/// 指定空明知其或Action的访问只限于满足授权的用户
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class UserInfoAuthorizationAttribute :