zoukankan      html  css  js  c++  java
  • MVC HttpUtility.HtmlEncode是如何编码的

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Web;


    namespace HttpUtilityDemo
    {
        class Program
        {
            static void Main(string[] args)
            {
                String myString;
                Console.WriteLine("Enter a string having '&' or '"'  in it: ");
                myString = Console.ReadLine();
                String myEncodedString;
                // Encode the string.
                myEncodedString = HttpUtility.HtmlEncode(myString);
                Console.WriteLine("HTML Encoded string is " + myEncodedString);
                StringWriter myWriter = new StringWriter();
                // Decode the encoded string.
                HttpUtility.HtmlDecode(myEncodedString, myWriter);
                Console.Write("Decoded string of the above encoded string is " +
                               myWriter.ToString());
                Console.Read();
            }
        }

    }


  • 相关阅读:
    SOA架构
    基于计算机视觉的交通场景智能应用-需求分析和原型设计
    《一线架构师实践指南》第三部分阅读笔记
    2020python练习三
    python数据分析
    可修改性
    淘宝网的六个质量属性
    Python学习十六
    Python学习十五
    Python学习十四
  • 原文地址:https://www.cnblogs.com/dxmfans/p/9434608.html
Copyright © 2011-2022 走看看