单引号转换 [英] Single Quote conversion

查看:133
本文介绍了单引号转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE8中, Me .btnAddRow.Attributes.Add( ,:onclick" "igtbl_addNew('ctl00xMainContentx"" +值+ " xgrdGeneric',0); " )

In IE8, Me.btnAddRow.Attributes.Add("onclick", "igtbl_addNew('ctl00xMainContentx" + value + "xgrdGeneric',0);")

上面的代码在运行时得到如下转换

the above code get converts as follows at runtime

"igtbl_addNew(' ctl00xMainContentxgrdGroupsxgrdGeneric',0);"

"igtbl_addNew('ctl00xMainContentxgrdGroupsxgrdGeneric',0);"

我真的不明白为什么单报价转换为 ' ,因此"igtbl_addNew"函数无法执行,而IE7则不会.

I really don't understand why the single quotes get converted as ' so "igtbl_addNew" function fails to execute whereas it does not happen with IE7.

请告诉我如何在运行时保持单引号.

谢谢.

 

推荐答案

Hmm ...以前我没有看到过,但是有关ASP.NET的问题属于不同的论坛:

Hmm... I haven't seen that before, but questions for ASP.NET belong in a different forum:

有关Web项目(ASP.Net)的问题

-
安德鲁


这篇关于单引号转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆