To encode or decode values outside of a web application, use the WebUtility class. For example, when embedded in a block of text, the characters are encoded as < and > for HTTP transmission.HTML encoding converts characters that are not allowed in HTML into character-entity equivalents HTML decoding reverses the encoding. If characters such as blanks and punctuation are passed in an HTTP stream, they might be misinterpreted at the receiving end. HttpUtility.HtmlDecode(myEncodedString, myWriter)Ĭonsole.Write("Decoded string of the above encoded string is " myWriter.ToString()) MyEncodedString = HttpUtility.HtmlEncode(myString)Ĭonsole.WriteLine("HTML Encoded string is " myEncodedString) String myEncodedString = HttpUtility.HtmlEncode(myString) Ĭonsole.WriteLine($"HTML Encoded string is: ") Ĭonsole.WriteLine("Enter a string having '
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |