AJAX Toolkits -- ListSearch

在AJAX Toolkits中有个ListSearch扩展功能,其主要用于DropDownList和ListBox

当用户输入信息之后,其会对此进行定位查询。其属性如下:

  • PromptText - 在对应控件的上方显示的初始信息,默认为'Type to search'.  当用户输入信息之后,该信息将会被用户实际输入的信息替代。注意,在布局该控件的时候,上方应留下部分距离
  • PromptCssClass - 弹出信息的CssClass. 
  • PromptPosition - 弹出信息的位置,默认为TOP,这里还有Buttom选项。如果控件是DropDownList,应保证为TOP;如果是ListBox则两者都可以。
  • Animations - Generic animations for the ListSearch extender. See the Using Animations walkthrough and Animation Reference for more details.
    • OnShow - The OnShow animation will be played each time the extender's prompt is displayed. The prompt will be positioned correctly but hidden. The animation can use <HideAction Visible="true" /> to display the prompt along with any other visual effects.
    • OnHide - The OnHide animation will be played each time the extender's prompt is hidden.
  • 这个属性我没有使用,太复杂了

代码示例

ContractedBlock.gif ExpandedBlockStart.gif Code
 1<asp:Panel ID="Panel1" runat="server" Width="400px">
 2            <asp:DropDownList ID="DropDownList1" runat="server">
 3                <asp:ListItem>Mike</asp:ListItem>
 4                <asp:ListItem>Lusia</asp:ListItem>
 5                <asp:ListItem>Sandra</asp:ListItem>
 6                <asp:ListItem>zura</asp:ListItem>
 7                <asp:ListItem>Ronaldo</asp:ListItem>
 8                <asp:ListItem>Giggs</asp:ListItem>
 9                <asp:ListItem>Van Der Sa</asp:ListItem>
10                <asp:ListItem>Alex</asp:ListItem>
11                <asp:ListItem>Flecher</asp:ListItem>
12                <asp:ListItem>Kim Don Gou</asp:ListItem>
13                <asp:ListItem>Kim 1111</asp:ListItem>
14                <asp:ListItem>Kim 22221</asp:ListItem>
15                <asp:ListItem>Kim 3333</asp:ListItem>
16                <asp:ListItem>Kim 44441</asp:ListItem>
17            </asp:DropDownList>
18        
19            <cc1:ListSearchExtender ID="DropDownList1_ListSearchExtender" runat="server" 
20                Enabled="True" TargetControlID="DropDownList1" PromptText="Search" Animations="">
21            </cc1:ListSearchExtender>
22        
23        </asp:Panel>

转载于:https://www.cnblogs.com/lx0831/archive/2009/01/05/1369633.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值