开发者

javascript unterminated string constant

开发者 https://www.devze.com 2023-02-19 22:45 出处:网络
I have the following function which I pass in a value, but this value is coming from the database. However I get the following javascript when doing the following:

I have the following function which I pass in a value, but this value is coming from the database. However I get the following javascript when doing the following:

showrootcausedetails('showrootcause',true,'<%# eval("Roo开发者_运维问答t Cause Analysis").ToString() %>')

I know I have to escape the characters, but How can I do that without knowing what is in the actual string?

Thanks,

Jacob


Call Server.JavaScriptStringEncode.

0

精彩评论

暂无评论...
验证码 换一张
取 消