I'm trying to convert the CascadingDropDown list sample to VB and I'm running into a problem. When I view the page, there are no errors but the dropdown lists don't populate. It doesn't seem like the webservice is being run. The reason I say this is beacuse if I change the "ServicePath" property on the aspx page to point to a nonexistant file, I get the exact same results....No error and no data in the lists. But I figure that if the ServicePath that Im pointing at doesn't exist, I should be getting an error. Here is my code for the .vb service and the .aspx code. What am I missing?
Inherits System.Web.Services.WebService
Private ReadOnly _document as New XmlDocument()
Private ReadOnly _hierarchy() as String
Public Sub CarsService()
'Read XML data from disk
_document.Load(Server.MapPath("~/App_Data/CarsService.xml"))
_hierarchy(0) = "Make"
_hierarchy(1) = "Model"
End Sub
<WebMethod()> _
Public Function GetDropDownContents(ByVal knownCategoryValues As String, ByVal category As String) As AtlasControlToolkit.CascadingDropDownNameValue()
Dim knownCategoryValuesDictionary as New StringDictionary
knownCategoryValuesDictionary = AtlasControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues)
Return AtlasControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(_document, _hierarchy, knownCategoryValuesDictionary, category)
End Function <atlas:ScriptManager id="ScriptManager1" EnablePartialRendering="true" runat="server"></atlas:ScriptManager>
<atlas:UpdatePanel ID="UpdatePanel1" runat="server">
<contenttemplate>
<table>
<tr>
<td>Make</td>
<td><asp:DropDownList ID="DropDownList1" runat="server" Width="170" /></td>
</tr>
<tr>
<td>Model</td>
<td><asp:DropDownList ID="DropDownList2" runat="server" Width="170" /></td>
</tr>
<tr>
<td>Color</td>
<td><asp:DropDownList ID="DropDownList3" runat="server" Width="170" /></td>
</tr>
</table>
<br />
<asp:Button ID="Button1" runat="server" Text="I want this car" OnClick="Button1_Click" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="[No response provided yet]"></asp:Label>
</contenttemplate>
</atlas:UpdatePanel>
<atlasToolkit:CascadingDropDown id="CascadingDropDown1" runat="server">
<atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList1" Category="Make"
PromptText="Please select a make" ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents" />
<atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList2" Category="Model"
PromptText="Please select a model" ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents"
ParentControlID="DropDownList1" />
<atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList3" Category="Color"
PromptText="Please select a color" ServicePath="CarsService.asmx" ServiceMethod="GetDropDownContents"
ParentControlID="DropDownList2" />
</atlasToolkit:CascadingDropDown>
</form>