數據庫中有有一條數據,它包括兩個圖片地址,和一些文字,如引號內所示:“sdfgs 撒地方撒地方<img src="http://localhost:3360/Content/editor/plugins/emoticons/10.gif" alt="" /> 撒地方撒地方撒地方<img src="http://localhost:3360/Content/editor/plugins/emoticons/12.gif" alt="" /> 地方官地方官”(亂搞用來測試的)我想讀出這條數據,在頁面上顯示圖片和文字的,但是卻得到了和上面一模一樣顯示的頁面,圖片并沒有被解析出來,還是一個標簽和對應的地址。(我也試了有css修飾的文字,結果是直接顯示css)我用的是MVC3,自動生成的代碼如下: <div class="display-field"> @Html.DisplayFor(model => model.newsContent) </div>
asp.net MVC 該如何解釋數據庫中的html 和css代碼
12345678_0001
2018-08-15 14:10:06