【问题标题】:How to escape an '&' in the password of a connection string如何在连接字符串的密码中转义“&”
【发布时间】:2014-10-15 21:09:48
【问题描述】:

所以我在 Visual Studio C# 中有一个连接字符串:-

我的密码是 - 'abcs#123ef&wejfl23'

'&' 正在关闭应用程序...我该如何转义这个字符?

【问题讨论】:

    标签: c# web-config connection-string


    【解决方案1】:

    “您需要像处理任何 XML 文档一样使用转义序列,这就是所有 .config 文件。”

    Ampersand = & = &
    Greater Than = > = >
    Less Than = < = &lt;
    Apostrophe = ' = &apos;
    Quote = " = &quot;"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-04
      • 1970-01-01
      • 2023-03-20
      • 1970-01-01
      • 2017-04-02
      相关资源
      最近更新 更多