Hi all,
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. Any help in this regard is much appreciated.
Thanks!