Last post Apr 17, 2013 05:26 PM by sukumarraju
Apr 17, 2013 12:32 PM|danieldunn10|LINK
Hi, I'm running a web service to populate cascading drop down boxes.
Level2: <asp:DropDownList ID="ddlLevel2" runat="server" />
<ajaxToolkit:CascadingDropDown ID="ccdLevel2" runat="server" TargetControlID="ddlLevel2"
ServicePath="Helper.asmx" ServiceMethod="GetLevel2" />
What I am trying to do is run some code after the web service has finished populating the drop down box.
Is this possible?
Apr 17, 2013 01:46 PM|sukumarraju|LINK
Apr 17, 2013 04:33 PM|danieldunn10|LINK
Thanks very much for this.
I have spent a couple of hours on it but I couldnt get any further sorry.
What I am looking for is some code which I can put somewhere like this
If WebService has finished Then
//run some code
What would this look like?
Apr 17, 2013 05:26 PM|sukumarraju|LINK
http://www.asp.net/web-forms/tutorials/aspnet-ajax/understanding-asp-net-ajax-web-services provides various alternatives to achieve the functionality.
As suggested earlier a Callback function can be invoked after web service returns data that is shown below.
Note that service and client should be on same domain due to CORS (Cross-Origin-Resource-Sharing). There are work arounds as discussed at https://www.simple-talk.com/dotnet/asp.net/calling-cross-domain-web-services-in-ajax/
var country = $get("txtCountry").value;
//onWSRequestComplete is callback function that is invoked after web service returns data
//callback function named OnWSRequestComplete that should be invoked when the asynchronous //Web Service call returns. OnWSRequestComplete handles the array of Customer objects returned from //the service and converts them into a table
if (results != null)
when the issue is still not resolved, post your source code (Service and client with configuration files) making sure that sensitive info is decoded.