Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return ArrayList
Message
From
23/07/2003 11:27:44
 
 
To
23/07/2003 10:07:32
General information
Forum:
ASP.NET
Category:
XML
Miscellaneous
Thread ID:
00812765
Message ID:
00812792
Views:
11
Sandra,

You don't say exactly what isn't working in your test, but typically, WebMethods should return a string. So, using al.ToString() would give you that (although, not having used ArrayLists, I'm not sure exactly how this string would look and what you could do with it).

~~Bonnie


>Hi. Is it possible to know how to return an ArrayList from a Webmethod.
>This is the code I've done but it doesn't work
>
> [WebMethod]
> public ArrayList testing()
> {
> ArrayList al = new ArrayList();
> al.Add("qqq");
> al.Add(2);
> return al;
> }
>
>I also tried :
> [WebMethod]
> [XmlInclude(typeof(ArrayList))]
> public Object testing()
> {
> ArrayList al = new ArrayList();
> al.Add("qqq");
> al.Add(2);
> return al;
> }
>
>thank you in advance.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform