作者jojo1865 (啾吉)
看板Ajax
标题[问题] Ajax的AutoComplete使用不同function
时间Thu Dec 2 19:45:54 2010
如标题
在程式中我已经加入一个基本的AutoComplete物件
部分设定如下:
ServicePath="~/AutoComplete.asmx"
ServiceMethod="GetCompletionList"
这样可以正常运作并显示GetCompletionList产生的内容
但是当我想要在该页放第2个AutoComplete物件
并希望它产生不同的内容时失败了
我是设定ServiceMethod="GetCompletionList0"
然後把GetCompletionList0放到跟GetCompletionList一样的
AutoComplete.cs中
只是换个名字...其他的不变
(TargetControlID是不同TextBox ID没错)
但是操作的时候还是跑到GetCompletionList去
而不是显示GetCompletionList0回传的string[]
换句话说
我在TextBox2输入文字,但是在TextBox2下面跑出跟TextBox1一样的结果
但是TextBox2输入文字应该跑出GetCompletionList0的结果才对
请问我该怎麽作
才可以让他跑GetCompletionList0(string prefixText, int count) ?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 61.219.21.171
※ 编辑: jojo1865 来自: 61.219.21.171 (12/02 19:58)