Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6058043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:33:18+00:00 2026-05-23T08:33:18+00:00

Alright so I’m using Microsoft’s Web Services and AJAX to get information from a

  • 0

Alright so I’m using Microsoft’s Web Services and AJAX to get information from a SQL database for use with java script on the client side. And I’m wondering what the best method is. Before I started working on the project, the web services were setup to return a C# List filled with some objects. Those objects variables (ints, strings, etc.) contain the data I want to use. Of course, java script can’t do much with this, to the best of my knowledge.

I then modified the web service to return a 2D Array, but java script got confused, and to the best of my knowledge can’t handle 2D array’s returned from C#. I then tried to use a regular array, but then a found the length property of an array in JS doesn’t carry over, so I couldn’t preform a for loop through all the items, because there wasn’t anyway of knowing how many elements there were.

The only other thing I can thing of is returning a string with special char’s to separate the data, but this seems way too convoluted. Any suggestions? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:33:19+00:00Added an answer on May 23, 2026 at 8:33 am

    EDIT

    First, I’m assuming your using a SOAP based Webservice. By SOAP, more or less I’m talking about a webservice (in this case C#) that generates XML messages to accept requests for data and send back results from those requests. You can read more about SOAP here: http://en.wikipedia.org/wiki/SOAP

    Going from a C# webservice to a C# client application is fairly simple since Visual Studio will automatically generate a consumer class for your client application. Example of this here: http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html (though I think Visual Studio has better integration than this example shows).

    More or less, your JavaScript will need to generate the appropriate SOAP request (XML) for your WebService to understand which method you want to invoke. After it has been invoked, you’ll need to use JavaScript to parse the response (also XML) for the data you want (jQuery is great for this).

    Here is a library that will help you make the request and get a response from your webserver. http://www.ibm.com/developerworks/webservices/library/ws-wsajax/

    Here’s a similar question on the same topic with a pretty good example : Simplest SOAP example

    Let me know if this is what you’re looking for. Hope it helps!

    ORIGINAL

    Your Data (2D Array, List, etc.) is being serialized to XML.

    So you’ll need your Javascript to parse the XML and not treat it like literal C# objects.

    OR like keatch said, return JSON

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, I'm just trying to learn about using Contact information, but I'm a bit
Alright. So I figure it's about time I get into unit testing, since everyone's
Alright I'm going to create a fairly complex form to post via AJAX a
Alright, currently I have my SWF hitting a php file that will go and
Alright, I have been doing the following (variable names have been changed): FileInputStream fis
Alright. So I have a very large amount of binary data (let's say, 10GB)
Alright, I'm trying to read a comma delimited file and then put that into
Alright, after doing a ton of research and trying almost every managed CPP Redist
Alright, I know how the fieldset / legend works out in HTML. Say you
Alright, quick question. A server is running in Eastern Time. PHP program needs to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.