问题描述
我使用的是MS AJAX AutoCompleteExtender上一个文本框。它的正常工作,除了当Web服务将返回如0010的字符串 - 在这种情况下,它会显示8
I'm using the MS AJAX AutoCompleteExtender on a textbox. It's working fine, except when the web service returns strings like "0010" -- in which case, it displays "8".
我终于意识到这是除preting字符串0010作为一个八进制数(,然后通过添加字符串,如0100和0x10的证明了这一点。)
I eventually realised it was interpreting the string "0010" as an octal number (and then proved the point by adding strings like "0100" and "0x10".)
我怎么能prevent呢?如果Web服务返回的0010,我想自动完成扩展也显示0010,而不是跨preT它作为八进制,并显示一个十进制等效值。
How can I prevent this? If the web service returns "0010", I want the autocomplete extender to also display "0010", and not interpret it as octal and display a decimal equivalent.
推荐答案
单引号了。的JavaScript使得它一个int。
Single quote it. JavaScript makes it an int.
这篇关于AJAX Asp.net AutoCompleteExtender除preting字符串0010为八进制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!