Currently, I am working on a piece of code located in a .ASPX.CS page...
img = "<img src=\"" + yellow + "\" align=\"middle\" onclick=\"alert('You are the current high bidder but the auction's minimum bid reserve has not been met. You need to increase your max bid until the reserve has been met to have a chance in winning this domain auction.');return false;\" class=\"sBtnImg\" alt=\"\" />";
This code gets inserted into a .ASPX page using an asp:repeater like this...
<%# getAuctionFlag(Eval("AuctionAmt").ToString(), Eval("WinningBid").ToString(), Eval("UserMaxBid").ToString(), Eval("AuctionTypeDesc").ToString(), "", Eval("BidStatus").ToString())%>
The issue I'm encountering is that there is a single quote within the alert message and all my efforts to escape it have been unsuccessful. I tried using \' and ', but .NET automatically escapes it before it is rendered as HTML. As a result, I end up with...
onclick="alert('TEXTHERE' TEXTHERE');return false;"