views:

282

answers:

1

I have a CascadingDropDown on an ASP.NET page.

Now, the prompt text is "Select State". (list of states).

However, on a different version of this page (ie querystring), i might want to set the selected index to "California" for example.

How can i do this?

The web service used by the ajax control (ie GetStates) gets invoked at the same time the jquery document.ready function is triggered (ie asynchronously).

So when i try and set the selected index in jquery, the items are not yet bound.

Is there a way to attach a handler to the ajax dropdown so that i can set the selected index once the webservice call has completed, and the items are bound?

A: 

So instead of trying to get tricky, i ended up replacing the CDDL with regular client-side dropdownlists and extending them with jQuery/AJAX.

RPM1984