1. 程式人生 > >Ext htmleditor型別值 儲存到資料庫

Ext htmleditor型別值 儲存到資料庫

在aspx頁面 加上ValidateRequest="false"
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PointRules.aspx.cs" Inherits="Apis_PointRules" ValidateRequest="false" %>

如果還是報 檢測到有潛在危險的 Request.Form 值

在web.config的system.web節點裡面加上<httpRuntime requestValidationMode="2.0" />就可以了。

這是.net framework 4.0版本及4.0版本以下的特點

.net framework 4.0版本以上就不會有這樣的問題了