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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:04:22+00:00 2026-05-29T20:04:22+00:00

Am using simple webservice .asmx.In my web service returning some data like: <?xml version=1.0

  • 0

Am using simple webservice “.asmx”.In my web service returning some data like:

<?xml version="1.0" encoding="utf-8" ?> 
  <string xmlns="http://tempuri.org/">

{"Table":[{"minlatency":16.0,"Time":"\/Date(1328248782660+0530)\/"},{"minlatency":7.0,"Time":"\/Date(1328248784677+0530)\/"},{"minlatency":13.0,"Time":"\/Date(1328248786690+0530)\/"},{"minlatency":6.0,"Time":"\/Date(1328248788690+0530)\/"},{"minlatency":20.0,"Time":"\/Date(1328248790707+0530)\/"}]}</string>

I am using:

[ScriptMethod(ResponseFormat = ResponseFormat.Json,  XmlSerializeString = false)]

after [webmethod]in my service,and it is giving error in ajax callback,i want return values in json format.

  • 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-29T20:04:26+00:00Added an answer on May 29, 2026 at 8:04 pm

    I had the same issue a few weeks ago, I found that using the following as my service

    [WebMethod]
    [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
    public void GetPointers() {
        DataTable dtmkrs = new DataTable();
        dtmkrs.Load(SPs.GetPointers().GetReader());
    
        string[][] pointerArray = new string[dtmkrs.Rows.Count][];
        int i = 0;
        foreach (DataRow mkrs in dtmkrs.Rows)
        {
            pointerArray[i] = new string[] { mkrs["LocationID"].ToString(), mkrs["Title"].ToString(), mkrs["Blurb"].ToString(), mkrs["Url"].ToString(), mkrs["LongLatPoint"].ToString() };
            i++;
        }
    
        JavaScriptSerializer js = new JavaScriptSerializer();
        string strJSON = js.Serialize(pointerArray);
        dtmkrs.Dispose();
        Context.Response.Clear();
        Context.Response.ContentType = "application/json";
        Context.Response.Flush();
        Context.Response.Write(strJSON);
    }
    

    and the following javascript (using mootools)

    new Request.JSON({
    url:<url to webservice>,
    method: 'GET',
    onSuccess: function(resJson, respText) {
            jsonResponse = resJson;
        dropJSON();
    }
    }).send();
    

    the previous is a function for getting Googlemaps markers from an SQL server database in ASP.NET c#

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

Sidebar

Related Questions

I've got a simple asmx web service that just needs to log some information
I'm creating a basic web service in asp.net/c# using simple ASMX services. When I
I have created a simple web-service using Java. i want to load jars related
I wrote a simple web service in C# using SharpDevelop (which I just got
I'm trying to create a simple AJAX & web service test (using C# .Net
How to upload image using jQuery (AJAX) and ASMX web service - asp.net? I
I have some basic questions related to the conversion of Web Service (.asmx) into
I've created a simple C# asp.net web service function which returns a string message
Using simple type like class A { public int X, Y; } with object
I am serializing a class using simple-xml ( http://simple.sourceforge.net/ ) but when i try

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.