1
如果你生成一個HTML串像如何ASP.Net MVC的東西,不Pars在瀏覽器取代HTML標籤
ViewBag.FinalHTML="<a href=\"http://stackoverflow.com\">StackOverFlow</a>";
,然後嘗試使用此代碼來顯示它在瀏覽:
This is the best Q&A for programming questions: @ViewBag.FinalHTML
那麼結果會是這樣:
This is the best Q&A for programming questions: <a href="http://stackoverflow.com">StackOverFlow</a>
(我知道我該怎麼做正確的我還有一個問題!)
ASP.Net MVC如何做到這一點?