ASP.NET 4.0 的 HTML 編碼語法,和背後的故事

15 years ago
在 .NET 2.0,要將 .aspx 網頁中顯示的字串編碼時,要這樣寫:     <%= HttpUtility.HtmlEncode(str) %> 到了 ASP.NET MVC 1.0,可以用 HtmlHelper 類別的 Encode 方法:     <%= Html.Encode(ViewData["Message"]) %>...
Page 1 of 8612386Next
技術提供:Blogger.