I have an ASP.NET web application and at a certain point I do this:
mycontrol.stringparameterforjscript = \"document.getElementById(\'\" + myotherparam + \"\').v
OK, I finally managed it. HTML Encoded strings recognized by the javascript engine, how's it possible? As you will see there is nothing to worry about in what happens.