使用Frontpage RPC管理web站点的文件[10]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

;html">需进行编码的html</param>
     /// <param name="e">进行编码的类</param>
     /// <returns>返回编码以后的值</returns>
     public string HtmlDecode(string html, Encoding e)
     {
        string htmlDecoded = HttpUtility.HtmlDecode(html);
        byte[] htmlDecodedBytes = Encoding.Unicode.GetBytes(htmlDecoded);
 
        char[] htmlDecodedChars = Encoding.Unicode.GetChars(htmlDecodedBytes);
        htmlDecodedBytes = new byte[htmlDecodedChars.Length];
        for(int i = 0; i < htmlDecodedChars.Length; i++)
        {
          htmlDecodedBytes[i] = (byte)htmlDecodedChars[i];
        }
        htmlDecoded = e.GetString(htmlDecodedBytes);
        return htmlDecoded;
     }
     /// <summary>
     /// html编码
     /// </summary>
     /// <param name="html">需进行编码的html</param>
     /// <returns>返回编码以后的值</returns>
     public string HtmlDecode(string html)
     {
        return this.HtmlDecode(html, HtmlEncoding);
     }
   }
}

本文关键:使用Frontpage RPC管理web站点的文件
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top