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 7717953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:02:26+00:00 2026-06-01T03:02:26+00:00

I have following webservice: [webmethod] public string MakeReservation(?? PassengersInfo)//what data type use for PassengerInfo

  • 0

I have following webservice:

[webmethod]
public string MakeReservation(?? PassengersInfo)//what data type use for PassengerInfo 
{
}

and in javascript I have following code.

 var ResultInfo = new Array();
    $("#GrdPassengerInformationMakeReservation").find('tr:not(:first)').each(function() {
        var Info = new Array();
        Info.push($(this).find('td:eq(1)').text());
        Info.push(($(this).find('td:eq(2)')).find('select').val());
        Info.push(($(this).find('td:eq(3)')).find('input').val());
        Info.push(($(this).find('td:eq(4)')).find('input').val());
        Info.push(($(this).find('td:eq(5)')).find('select').val());
        Info.push(($(this).find('td:eq(6)')).find('input').val());

        ResultInfo.push(Info);

    })
$.ajax(
    { url: "Ajaxes/Reservation.asmx/MakeReservation",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        type: "POST",
        data: "{'PassengersInfo':'" + ResultInfo + "'}",
        async: false,
        success: function(data) {

        }
});

I want to pass ResultInfo to webservice.
What data type should I use in my webservice?

  • 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-06-01T03:02:27+00:00Added an answer on June 1, 2026 at 3:02 am

    Since Info is an Array, use Array at the server side. But in that case you can pass the Info as such instead of sending it inside another array which is again wrapper into an object in your ajax post method, i.e. data: Info.
    Or you can use ArrayList since ResultInfo contains arrays (in this case only one array). In that case sent the ajax post with data: ResultInfo.

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

Sidebar

Related Questions

I have the following code: [WebMethod] [SoapHeader(_webServiceAuth)] public User GetUser(string username) { try {
I have the following web service: [ScriptService] public class Handler : WebService { [WebMethod]
I have tried to use the following code to retrieve the data from the
I have the following endpoint interface: @WebService public interface SEIWebService { @WebMethod @WebResult(name=CreateWorkOrderItemResponse) CreateWorkOrderItemResponse
I have come up with the following code to call a webservice using client/server
I currently have the following code: <%@ WebService Language=C# Class=Notifications %> using System; using
I have created a .NET WebService. There I have implemented the following WebMethod: [WebMethod]
I have the following ajax call to webservice to pass json data and get
I have the following code which is trying to post xml constructed data to
I have following string String str = replace :) :) with some other string;

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.