我有這張簡單的桌子。其中一個字段被稱爲內容與Nvarchar(最大)。如何通過webform將部分HTML代碼提交給SQL Server數據庫?
如果我使用SQL Server Management直接在數據庫中編輯該字段,那麼在下面添加下面的文本,它會很好地存儲它。
文字:
Do you open the menu at a restaurant ever expanding multi-cultural tourist hub, Chinatown has a lot to offer to meet your culinary desires, from China and beyond.<br /></br>This tour will be the first in a series the food.
但是,如果我試圖提交上述使用ASPX頁面的網頁表單到數據庫相同的文字,我得到下面的錯誤,我承擔的,因爲2 <br />
代碼
從 客戶端檢測到有潛在危險的Request.Form值(tbTourDetails =「... nd beyond。
This tour ...」)。
我該如何解決這個問題,這樣我就可以有一個Web表單,將HTML部分提交給我的數據庫?
問候 茶
做在存儲和解碼之前進行html解碼。 – CodeSpread