最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

asp.net - Escape apostrophe in aspx file - Stack Overflow

programmeradmin2浏览0评论

How do I escape apostrophes / single quotes in ASP XML?

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

How do I escape apostrophes / single quotes in ASP XML?

<asp:Button ID="myButton" runat="server"
    OnClientClick='confirm("How do you escape this apos'trophe?")' />
Share Improve this question edited Aug 24, 2012 at 14:55 Craig Ringer 326k80 gold badges735 silver badges813 bronze badges asked Apr 15, 2010 at 19:27 Joe PhillipsJoe Phillips 51.3k33 gold badges108 silver badges166 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6
<asp:Button ID="btnClone" runat="server" OnClick="btnClone_Click"
    OnClientClick="confirm('How do you escape this apos\'trophe?')" />
<asp:Button ID="myButton" runat="server"
    OnClientClick='confirm("How do you escape this apos&#39;trophe?")' />
发布评论

评论列表(0)

  1. 暂无评论