ASP.NET quote character encoding causes problems when setting a control's property

后端 未结 2 1047
余生分开走
余生分开走 2021-01-22 03:00

I have an ASP.NET web application and at a certain point I do this:

mycontrol.stringparameterforjscript = \"document.getElementById(\'\" + myotherparam + \"\').v         


        
2条回答
  •  甜味超标
    2021-01-22 03:59

    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.

提交回复
热议问题