首先,在提交形式字符串时,要在Control中使用[ValidateInput(false)]来实现

   [ValidateInput(false)]
        [HttpPost]
        public ActionResult CompanyIntroduction(string Introduction)
        {
           
        }

   对于其他Asp.Net可以使用

    web.config

  <system.web>
    <httpRuntime requestValidationMode="2.0" />
  </system.web>

其次在Razor视图中接收的时候,要使用Html的Raw方法对html字符串进行编码

  @Html.Raw((string)@ViewBag.Introduction)

相关文章:

  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-06-24
  • 2022-01-10
  • 2022-03-03
猜你喜欢
  • 2021-05-22
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案