<%@ Page Language="VB" Debug="true" EnableViewState="False" %>
<%@ Register TagPrefix="ELB" Namespace="ELB" Assembly="EasyListBox" %>
<script runat="server">

</script>
<html>
    <head>
    <title>EasyListBox.com: Related listbox ajax demo</title>
    <link href="mainStyle.css" type="text/css" rel="stylesheet" />
    </head>
    <body bgcolor="#ffffff" marginwidth=0 marginheight=0 topmargin=0><center>
    <form id="mainForm" method="post" runat="server">

        <center>

        <table border=0 cellpadding=8 cellspacing=0 style="font-size:6pt;font-weight:bold;background:#ffffff;">
        <tr><td valign="top" style="font-size:8pt;font-weight:bold;border:5px double #739cce;border-bottom:0px solid white;">
        Component Vendors:<br>
        <ELB:EasyListBox id="vendorList" ChildList="componentList" DisplayMode="Listbox"
         DataTextField="VendorName" DataValueField="VendorID"
         SelectQuery="SELECT VendorID, VendorName FROM tblVendors WHERE VendorActive = 1 ORDER BY VendorName"
         ConnectionStringSqlServer="connectionstring"
         ButtonColor="#ff9633" ArrowColor="#ffffff"
         RollBGColor="#739cce" RollTextColor="#ffffff"
         Height="150px" Width="300px" runat="server">
        </ELB:EasyListBox>
        </td>
        </tr>
        <tr>
        <td valign="top" style="font-size:8pt;font-weight:bold;border:5px double #739cce;border-top:0px solid white;">
        Products:<br>
        <ELB:EasyListBox id="componentList" Height="150px"
         RollBGColor="#739cce" RollTextColor="#ffffff" CacheData="True" CacheDuration="100"
         ButtonWidth="14" ButtonHeight="18"
         ButtonColor="#ff9633" ArrowColor="#ffffff"
         Width="400px" ParentList="vendorList"
         DisplayMode="Listbox" UseAjax="True"
         DataTextField="ComponentName" DataValueField="ComponentID" DataFilterField="VendorID"
         ConnectionStringSqlServer="connectionstring"
         SelectQuery="SELECT ComponentID, ComponentName, VendorID FROM tblComponents ORDER BY VendorID"
         runat="server" />
        </td>
        </tr>
        </table>
        <br />
        <input type="submit" value="Submit form" />
        <hr size=1 width="100%" color="#ff8600">
        </center>
        Just as with the combobox, simply set <b>UseAjax</b> to true on your child lists, and watch the magic happen.
        The lists will retrieve their items from the server as needed, with no more code to add.
        <br /><br />
        <a href="downloads/demoDependent.zip" target="demoWin"><b>Download this sample application</b></a> |
        <a href="demoDependent_code.html" target="demoWin"><b>View the code</b></a>
        <hr size=1 width="100%" color="#ff8600">
        <br /><br />
    </form>
    </body>
</html>