Sunday, March 11, 2012

CascadingDropDown calls WebMethod twice

I'm not seeing that behavior with the sample page that comes with the Toolkit. I modified CascadingDropDown.aspx as:

< <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="~/CascadingDropDown/CarsService.asmx" ServiceMethod="GetDropDownContents" ParentControlID="DropDownList2" />
--
> <atlasToolkit:CascadingDropDownProperties TargetControlID="DropDownList2" Category="Model" PromptText="Please select a model" ServiceMethod="GetDropDownContentsPageMethod" ParentControlID="DropDownList1" />

And set a breakpoint on GetDropDownContentsPageMethod inCascadingDropDown.aspx. I find that it gets called exactly once when I choose a Make (to populate the Model list).

Maybe this is something specific to your scenario?


I fixed it, as it was on a complex page I had got twoatlasToolkit:CascadingDropDowns on the page and they where caling the method twice.

sorry for any confusion, i'm new to Atlas!


Okay - good - that makes sense. I wassure we tested this and got it right. :)

No comments:

Post a Comment