- UID
- 3662
中校
- 积分
- 27969
- 经验
-
- 点数
-
- 油豆
-
- 荣誉
-
- 在线时间
- 小时
- 注册时间
- 2006-9-13
- 最后登录
- 1970-1-1
该用户从未签到
|
本帖最后由 ssqj111 于 2012-6-18 13:06 编辑
Description
Description is required
I was having a problem with my autocomplete extender filling with "undefined" when numbers rather than letters were involved in the db query return. My web service was retrieving and returning everything just fine but the autocomplete could not handle the numbers even though I tried converting to strings before adding to the array.
THE FIX: instead of converting just wrap the number in single quotes
i.e.
Dim drPart As DataRow
For Each drPart In dsParts.Tables(0).Rows
'the two quotes are added because autocomplete is retarded when handling numbers
lItems.Add("'" & drPart("sItemID") & "'")
Next
Return lItems.ToArray()
This will in turn be automatically stripped out by the control and voila you have the numbers showing up just fine
|
|