Link to home
Start Free TrialLog in
Avatar of HLRosenberger
HLRosenbergerFlag for United States of America

asked on

AJAX cascading dropdown in Visual Studio

I've created the project in this video:  http://www.asp.net/ajax/videos/how-do-i-use-the-aspnet-ajax-cascadingdropdown-control-extender

The code that I downloaded was for VS 2008.  I'm using VS 2010.   I've created the project in VS 2010.  No compile errors.  

However, when I run, I get my screen with the three down downs, but they are not populated.   I do not even get the prompt text.  It's like the data from the XML file is not being read.  Can anyone take a guess as to what I might be missing?   I attached my HTML below.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SetDocumentType.aspx.vb" Inherits="Default2" %>

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

<!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">
    <div style="width: 525px">
    
    &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <br />
        <br />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:DropDownList ID="DropDownList1" runat="server" Width="182px">
                    </asp:DropDownList>
                <br />
                <br />
                    <asp:DropDownList ID="DropDownList2" runat="server" Width="182px">
                    </asp:DropDownList>
                <br />
                <br />
                    <asp:DropDownList ID="DropDownList3" runat="server" Width="182px" AutoPostBack="True">
                    </asp:DropDownList><br />
                    <br />
                    <asp:Label ID="Label1" runat="server" Width="327px"></asp:Label><br />
                    <br />
                   
                    <ajax:cascadingdropdown id="CascadingDropDown1" runat="server" category="Make"
                        loadingtext="[Loading makes...]" prompttext="Please select a make" servicemethod="GetDropDownContents"
                        servicepath="CarsService.asmx" targetcontrolid="DropDownList1">
                    </ajax:cascadingdropdown>
                    <ajax:cascadingdropdown id="CascadingDropDown2" runat="server" category="Model"
                        loadingtext="[Loading models...]" parentcontrolid="DropDownList1" prompttext="Please select a model"
                        servicemethod="GetDropDownContentsPageMethod" targetcontrolid="DropDownList2">
                    </ajax:cascadingdropdown>
                    <ajax:cascadingdropdown id="CascadingDropDown3" runat="server" category="Color"
                        loadingtext="[Loading colors...]" parentcontrolid="DropDownList2" prompttext="Please select a color"
                        servicemethod="GetDropDownContents" servicepath="CarsService.asmx" targetcontrolid="DropDownList3">
                    </ajax:cascadingdropdown>
                    &nbsp;
                </ContentTemplate>
            
        </asp:UpdatePanel>
        <br />
        <br />
        <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="cmdAccept" runat="server" Text="Accept" />
    
    </div>
    </form>
</body>
</html>

Open in new window

Avatar of HLRosenberger
HLRosenberger
Flag of United States of America image

ASKER

Also, the service that gets called is GetDropDownContents.  It has parameters.  How/Where are these parameters passed, because in the properties where the Service Method is set, there are no parms.
Avatar of soujanya_g
soujanya_g

ASKER CERTIFIED SOLUTION
Avatar of HLRosenberger
HLRosenberger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial