I saw MvcHtmlString in msdn but I have a question about Encoding.
What is exactly Encode ASP.Net MVC and what is the difference between Encode and Decode Value?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Some characters must be encoded to ensure proper display. For instance
<and>are special characters that tell the browser that the text between the two is an HTML tag and must be interpreted as part of the markup. To be able to display<and>as part of the text, it must be encoded. HTML encoding will substitute these with<and>respectively. The browser then knows it’s not part of the markup and displays it accordingly.Decoding is the other way around:
<becomes<,&becomes&, etc.