這種問題有兩種方案blog
方案一:string
[ValidateInput(false)] public ActionResult Index() { string ss = Request["rec"]; //客戶端輸入了res=<table> return View(); }
方案二:io
在WebConfig中配置:table
<httpRuntime requestValidationMode="2class
<pages validateRequest="false"/>.0"/>配置