两步
一.在</system.web>之前加上<httpRuntime requestValidationMode="2.0" />
<httpRuntime requestValidationMode="2.0" /> </system.web>
二.控制器方法之前加 [ValidateInput(false)]
[ValidateInput(false)]public ActionResult AddInfo(){}
Copyright @ 2024 天使半只翼 Powered by .NET 8.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster