在aspx文件中逃避撇号

Joe*_*ips 1 javascript xml asp.net escaping

如何在ASP.net XML中转义撇号/单引号?

<asp:Button ID="myButton" runat="server"
    OnClientClick='confirm("How do you escape this apos'trophe?")' />
Run Code Online (Sandbox Code Playgroud)

Cla*_*edi 6

<asp:Button ID="btnClone" runat="server" OnClick="btnClone_Click"
    OnClientClick="confirm('How do you escape this apos\'trophe?')" />
Run Code Online (Sandbox Code Playgroud)