<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DefaultVB.aspx.vb" Inherits="DropDownList.Examples.ApplicationScenarios.CascadingDropDownLists.DefaultVB" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div class="demo-container no-bg">
<telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">
<table>
<tbody class="order">
<tr>
<td>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="DropDownVehicleType"
Skin="Silk" TabIndex="1" Width="200" DropDownWidth="200" DefaultMessage="Select Vehicle Type..."
AutoPostBack="true" OnSelectedIndexChanged="DropDownVehicleType_SelectedIndexChanged"
DataSourceID="SqlDataSource1" DataTextField="TypeName" DataValueField="ID">
</telerik:RadDropDownList>
</td>
<td>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="DropDownVehicleBrand"
Skin="Silk" TabIndex="1" Width="200" DropDownWidth="200"
DefaultMessage="Select Vehicle Brand..." AutoPostBack="true"
OnSelectedIndexChanged="DropDownVehicleBrand_SelectedIndexChanged"
DataSourceID="SqlDataSource2" DataTextField="VehicleName" DataValueField="ID">
</telerik:RadDropDownList>
</td>
<td>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="DropDownVehicleModel"
Skin="Silk" TabIndex="1" Width="200" DropDownWidth="200" DefaultMessage="Select Vehicle Model..."
DataSourceID="SqlDataSource3" DataTextField="VehicleName">
</telerik:RadDropDownList>
</td>
<td class="buttons">
<telerik:RadButton RenderMode="Lightweight" ID="btnGetData" Skin="Silk" Text="Select Vehicle" OnClick="btnGetData_Click" runat="server" />
</td>
</tr>
</tbody>
</table>
<asp:PlaceHolder runat="server" ID="OrderTable" Visible="false">
<table class="order-summary">
<tbody>
<tr>
<th>Vehicle Type:
</th>
<td>
<asp:Label ID="labelVehicleType" runat="server" />
</td>
</tr>
<tr>
<th>Vehicle Brand:
</th>
<td>
<asp:Label ID="labelVehicleBrand" runat="server" />
</td>
</tr>
<tr class="price-row">
<th>Model:
</th>
<td>
<asp:Label ID="labelModel" runat="server" />
</td>
</tr>
</tbody>
</table>
</asp:PlaceHolder>
</telerik:RadAjaxPanel>
</div>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
SelectCommand="SELECT * FROM [Vehicles] WHERE [VehicleParentID] IS NULL"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
SelectCommand="SELECT * FROM [Vehicle_Types]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString %>"
SelectCommand="SELECT * FROM [Vehicles] WHERE [VehicleParentID] = @VehicleID AND [VehicleTypeID] = @VehicleTypeID">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownVehicleBrand" PropertyName="SelectedValue" Name="VehicleID" />
<asp:ControlParameter ControlID="DropDownVehicleType" PropertyName="SelectedValue" Name="VehicleTypeID" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>