문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top