Advance listbox search using FilteredTextBoxExtender ajax

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="listsearcheg.aspx.vb" Inherits="listsearcheg" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    
Click on me to search an item    
    <asp:ListBox ID="ListBox1" runat="server">
        <asp:ListItem>india</asp:ListItem>
        <asp:ListItem>pakistan</asp:ListItem>
        <asp:ListItem>agganistan</asp:ListItem>
        <asp:ListItem>america</asp:ListItem>
          <asp:ListItem>south</asp:ListItem>
            <asp:ListItem>London</asp:ListItem>
              <asp:ListItem>USA</asp:ListItem>
                <asp:ListItem>China</asp:ListItem>
                  <asp:ListItem>Canada</asp:ListItem>
                    <asp:ListItem>Washington</asp:ListItem>
    </asp:ListBox>
    <asp:ListSearchExtender ID="ListBox1_ListSearchExtender" runat="server"
        Enabled="True"  PromptPosition="Top"  PromptText="Click on Listbox to search"  
        TargetControlID="ListBox1">
    </asp:ListSearchExtender>
    
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:FilteredTextBoxExtender TargetControlID="TextBox1" FilterInterval="0"  
        FilterMode="InvalidChars" FilterType="Custom,Numbers"  
        ID="FilteredTextBoxExtender1" runat="server" ValidChars="789">
    </asp:FilteredTextBoxExtender>
    </form>
</body>
</html>


Thanks
Ebook Download
View all
Learn
View all