C# Decode Special Character In Javascript

Kasusnya ketika menampilkan field C# dengan tipe string, pada field tersebut terdapat special character contoh: ‘&’. Terjadi kasus sebagai berikut, character ‘&’ yang tampil di view berubah menjadi ‘&’, bukan ‘&’ .

Untuk mengatasi masalah tersebut gunakan fungsi di bawah ini:
@Html.Raw(string);

Yosef Sukianto has written 36 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>