473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Ajax toJSON not working

balajibirlasoft
Am using a default converter object in ajax to convert the tables collection to a JSON string.

First Input for toJSON Method is strTempData(String Builder)

Second Input is the object for which i passed a DataSet.Tables collection.

Ajax.JSON.DefaultConverter.ToJSON(ref strTempData, objResultDTO.Resultdtset.Tables);

I will connect to this page using XMLHTTP and return the generated JSON string back to the Client and process the JSON String for every x seconds using SetTimeout method.

At Some times it is working correctly and generates and Returns the JSON string correctly.

But after some time it is returning the Object name directly like "System.Data.DataTableCollection".

Why it is not processing the object correctly to generate the JSON ?
What might be the problem...?
Ajax Version = 5.6.3.4
Feb 11 '08 #1
4 2438
Any one knows how to use Ajax.JSON.DefaultConverter.ToJSON method
or is it a correct method to generate the JSON String

Ajax Version = 5.6.3.4

Because am not able to generate the JSON string correclty all the times..
Some times it is correctly converting it into JSON String and at some time it is directly giving the string like System.Data.DataSet or DataTableCollection or DataRow directly as output
Feb 11 '08 #2
acoder
16,027 Expert Mod 8TB
Merged threads on the same problem.

What library are you using?
Feb 11 '08 #3
Ajax.NET Library version 5.6.3.4
Ajax.dll

I added a reference to the ajax.dll and used those methods..

Using this method

Ajax.JSON.DefaultConverter.ToJSON(sb,obj)

How can i overcome this problem..?

Please give me a suggestion...
Feb 12 '08 #4
acoder
16,027 Expert Mod 8TB
Well, in that case, you'll have better luck in the .NET forum to which I've moved this thread.
Feb 12 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: bobzimuta | last post by:
I'm creating a simple AJAX library. It's an object that will return an array containing the response text or xml. I'm trying to find a way to assign the response as a property of the object, but...
25
by: meltedown | last post by:
This is supposed ot be an example: http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/ It says : This example is probably the simplest example you will ever...
13
by: Karl | last post by:
Hi all. I've recently rebuilt my Vista Ultimate workstation with Visual Studio Team Developer edition. Ive also put on the SQL Server 2005 tools and it's fully patched. I was building a web...
3
by: nuchphasu | last post by:
Hi I have a problem on Dropdownlist that connect database and retrieve data by Ajax.I write javascript like this -------------------------------------------------------------------------...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
1
by: shaunwo | last post by:
I'm an AJAX / DOM Novice (at best) and trying to figure out how to write the value to a couple input fields. I don't remember exactly where I got the ajax.js file I'm using from (went to the website...
9
by: Trapulo | last post by:
Hello, with ASP.NET 2.0 Ajax every unexpected error is managed client-side with a popup that reports the error to the user. In ASP.NET 3.5 this behavor has been changed: how can I have a similar...
1
by: Mark B | last post by:
This is my first try at using AJAX. I want the calendars to be enabled if the user checks CheckBox1. It works OK for a normal all page refresh but once I introduced the AJAX code it stopped...
11
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.