日期:2014-05-18  浏览次数:20737 次

请教字符编码的代码
要把下面字符串:
/wEWCAK4kpaYCgL8rs2vCgLAnbyjAQL+leu8DgKKkorhCwKLkorhCwLJ2fTxBAKL0KnPDEtAPgjAGjK9a3m9r/b3gx+KmIdT
转换成:
%2FwEWCAK4kpaYCgL8rs2vCgLAnbyjAQL%2Bleu8DgKKkorhCwKLkorhCwLJ2fTxBAKL0KnPDEtAPgjAGjK9a3m9r%2Fb3gx%2BKmIdT

c#要怎么写

------解决方案--------------------
C# code
        string str = "/wEWCAK4kpaYCgL8rs2vCgLAnbyjAQL+leu8DgKKkorhCwKLkorhCwLJ2fTxBAKL0KnPDEtAPgjAGjK9a3m9r/b3gx+KmIdT";
        Response.Write(HttpUtility.UrlEncode(str));
//%2fwEWCAK4kpaYCgL8rs2vCgLAnbyjAQL%2bleu8DgKKkorhCwKLkorhCwLJ2fTxBAKL0KnPDEtAPgjAGjK9a3m9r%2fb3gx%2bKmIdT