I have a MVC view in which I have to pass a string variable to JavaScript, but that string variable has single quotes in it (
). I am trying to do something like this
<a onclick="JavaScript:AddressHandler.ProcessAddress( <%= homeAddress %> );"
class="button-link">change</a>
homeAddress has single quotes which I have to workaround somehow so that I can pass the complete value of it to the JavaScript.