0
我有一個存儲html的db字段,我想在用戶端呈現該html。但我無法這樣做。當我試圖把HTML標籤或段落標籤,然後我只是HTML文本。這裏是我的代碼,我試圖MVC中的div標記中呈現HTML 3
<%: HttpContext.Current.Server.HtmlDecode(Model.HomePageText) %>
,我得到使用該(HTML顯示爲文本)以下結果
<p> </p> <p style="color: rgb(88, 100, 109); font-family: 'PT Sans', sans-serif; font-size: 13px; line-height: 16px; background-position: -1px -350px; "> Enter custom CSS code into the box below to further customize your mobile site.</p>
thanx ....它的工作! –
@AnkushJain如果他幫助解決您的問題,請考慮獎勵Marek,並將他的回答標記爲已接受。 :) – Kjartan