Razor will HTML encode everything, so to prevent the ' from being encoded to ', you can use alert('@Html.Raw(ViewBag.str)'); However, now you've got an ...
確定! 回上一頁