转成 Base64 形式的 System.String:
    

string a = "base64字符串与普通字符串互转";  
    byte[] b = System.Text.Encoding.Default.GetBytes(a);      
    //转成 Base64 形式的 System.String  
    a = Convert.ToBase64String(b);  
    Response.Write(a);  

 


 
转回到原来的 System.String:

    byte[] c = Convert.FromBase64String(a);  
    a = System.Text.Encoding.Default.GetString(c);  
    Response.Write(a);

 

相关文章:

  • 2021-11-02
  • 2021-12-07
  • 2021-08-27
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-02-08
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-10
相关资源
相似解决方案