Home Encoding text in .cshtml file

# Encoding text in .cshtml file

jinal
1#
jinal Published in 2017-09-12 09:41:36Z
 I have one .cshtml file in mvc c# I want to encode string using HttpUtility.HtmlEncode but its resulting into namespace error. Can anyone help me how i can encode this text "PICO+"? 

 You have to use @Html.Encode, I've edited your code: 
 I hope this can help.