在Atlas中,默认的AutoComplete Extender并没有提供滚动条,可以定义一个Panel 或者Div作为下拉区域附加到AutoComplete Extender,并定义Panel或者Div的样式,让它具有滚动条就可以了。
定义Panel作为下拉区:
<asp:Panel ID="dropdown" Height="100px" ScrollBars=Vertical runat=server></asp:Panel>
设置AutoComplete Extender的DropDownPanelID属性为上面定义的Panel:
<atlas:AutoCompleteExtender
DropDownPanelID="dropdown"
ServicePath="AutoCompleteService.asmx"
ServiceMethod="GetSuggestions"
MinimumPrefixLength="1"
runat="server">
<atlas:AutoCompleteProperties
TargetControlID="searchText"
Enabled="true" />
</atlas:AutoCompleteExtender>
DropDownPanelID="dropdown"
ServicePath="AutoCompleteService.asmx"
ServiceMethod="GetSuggestions"
MinimumPrefixLength="1"
runat="server">
<atlas:AutoCompleteProperties
TargetControlID="searchText"
Enabled="true" />
</atlas:AutoCompleteExtender>
感兴趣的朋友可以去试一下。
英文地址:http://blogs.msdn.com/piyush/archive/2006/10/17/autocomplete-with-scroll-bar.aspx