具有潛在危險 Request.Form 的值已從用戶端
具有潛在危險 Request.Form 的值已從用戶端 ValidateInput: 對指定Action允許輸入特殊字元 [HttpPost] [ValidateInput(false)] public JsonResult SaveST0401M( string status) { ... return Json(new { result = result, msg = msg }); } AllowHtml: 對特定屬性允許輸入特殊字元 public class TestModelsAllowHtml { [Display(Name = "AllowHtml" )] [AllowHtml] public string AllowHtml { get ; set ; } } JavaScript escape($.trim($("#txtCODE_NO").val())) // unescape() 函数可对通过 escape() 编码的字符串进行解码。 Asp.net MVC C# Controller.cs CODE_NO = HttpUtility.UrlDecode(txtCODE_NO); 參考資料: 1. https://dotblogs.com.tw/brooke/2016/10/27/172920 2. http://love-coding.blogspot.tw/2015/09/aspnet.html 3. http://www.w3school.com.cn/js/jsref_unescape....