Do we have AJAX dropdownlist to bind with a WCF Web Service?

Last post 05-15-2008 3:02 AM by Jonathan Shen – MSFT. 3 replies.

Sort Posts:

  • Do we have AJAX dropdownlist to bind with a WCF Web Service?

    05-09-2008, 12:26 PM
    • Loading...
    • qbui66
    • Joined on 10-14-2007, 11:22 PM
    • Posts 43

    Hi all,

    I have a WCF Web Service that returns an array of customer numbers that I need to display it in a drop down list.  I want to call the WCF web service in the drop down list instead of binding.  Is there a way to do it now?  I read some where that the feature wasn't available in 2007 but wondering if it's here now.  The article mentions that you can call the asmx web service in the drop down list, and the work around is build the asmx web service to call the WCF web service.  So:

    1.  Can we call the WCF web service in the drop down list now?

    2.  If we can't, then how can I build the asmx web service to call the WCF web service?

    Thanks in advance!

    Qbui

  • Re: Do we have AJAX dropdownlist to bind with a WCF Web Service?

    05-11-2008, 5:48 PM
    • Loading...
    • qbui66
    • Joined on 10-14-2007, 11:22 PM
    • Posts 43

    It appears that we probably do not have AJAX dropdownlist that binds to a WCF Web Service so I think of another way and wonder if this works or not, so please let me know if my thinking is right:

    I have a WCF web service that returns an array of customer IDs that I want to display in a drop down list.

    To do that, I think I can use ObjectDataSource and have the drop down list to call that ObjectDataSource.

    To use the ObjectDataSource, I have to write a Data Access Class that has select method to call the WCF service to get an array of customer IDs.

    Do you think it will work?  Or does any of you have a better solution to this problem?  Thanks in advance!

    Qbui

  • Re: Do we have AJAX dropdownlist to bind with a WCF Web Service?

    05-11-2008, 7:13 PM
    • Loading...
    • qbui66
    • Joined on 10-14-2007, 11:22 PM
    • Posts 43

    I just made a quick test and it works as I described above.  If anyone has a better solution, please let me know.  Thanks!

  • Re: Do we have AJAX dropdownlist to bind with a WCF Web Service?

    05-15-2008, 3:02 AM
    Answer

    Hi Qbui66,

     As far as I know,  WCF can work with ASP.NET AJAX.  We use first call the WCF WebSerivces (just as WebService does) and get the returned jason object on client.  Now we can use javascript to do something on the target control according to the Jason object.  In your condition, we can generate all the dropdown items manually.

    Best regards,

    Jonathan

     

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (4 items)