Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Does anyone know how to pass a List<t> to a WCF Service

Posted on 2010-11-11
4
421 Views
Last Modified: 2012-06-21
I have a WCF service that accepts a List<participants> as a parameter and I need to call it from the client ie javascript.  Can this be compeleted?

I'm looking to do something like.
var svc = new EMService();
                var valParti = $('#ddlParticipant').val();
                var list = new List<Participant>();
                var part = new Participant();
                list.Add(part);
                svc.SendMessageAll(list, onSuccess, null, null);
0
Comment
Question by:zekuczynski
  • 2
4 Comments
 
LVL 7

Expert Comment

by:keustermans
ID: 34119295
Hi there,

As far as I know you are notable to pass generic objects through wcf.

0
 

Author Comment

by:zekuczynski
ID: 34120212
Is there another approach I can take?  Can I pass a collection or list of objects?
0
 
LVL 7

Accepted Solution

by:
dxdinh earned 500 total points
ID: 34127657
Can you try to convert your List<P...> collections to Participant [] using ToArray method?
0
 

Author Closing Comment

by:zekuczynski
ID: 34155579
That worked.  Thanks.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question