Web Methodst that returns DataTable gives me exception error " "circular reference was detected while serializing an object of type""

Hello,

I am getting this error "circular reference was detected while serializing an object of type". The Method GetRecords() is a function that returns DataTable type.. It happens the same thing when i return DataSet as well.

Any help?

Thanks

 

 

function GetStatusRecord() {

 

// Invoke the Echo method on the server.

PageMethods.GetRecords('1', onComplete);

 

debugger;

// Callback function.

function onComplete(result) {

// Display the echoed string.

alert(result);

}

 

return false

}

 

0
Kiril2006
5/18/2007 9:06:48 PM
asp.net.ajax-discussion 13973 articles. 1 followers. Follow

2 Replies
1565 Views

Similar Articles

[PageSpeed] 29

The latest version of Asp.net Ajax no longer allows to serialize DataTable and DataSet anymore.


Long Live .NET
Kazi Manzur Rashid (Amit)
_________________________
Web: http //dotnetshoutout.com
Blog: http://weblogs.asp.net/rashid
Twitter: http://twitter.com/manzurrashid
0
KaziManzurRashid
5/18/2007 10:26:13 PM

you are probably right, i havent updated asp.net ajax for about 6 months.

0
Kiril2006
5/18/2007 11:08:22 PM
Reply:

Similar Artilces:

JSON Error: "A circular reference was detected while serializing an object of type ..."
I'm trying to do pretty much exactly what this example (in the link shown below) shows. And I get the error of "A circular reference was detected...". http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx - Passing and Returning Complex Types - 2nd example Does anyone know why this error occurs?  Looking at the example (from the link), I would think that would generate the error, but it doesn't. Essentially what I'm trying to do is: In Javascript: Collect form values from the HTML via Javascript build an object of a specific...

help with error: "a circular reference was detected while serializing an object of type: 'Album"OpinionType'
I am new to Ajax and also to Javascript. I am just starting with some simple tests of remote calls to a page method to retreive an object. When I put a break in the page method I can see that the object gets retreived correctly on the server but it cant serialize it it seems (by the eror message) can anyone help?<WebMethod()> Public Shared Function GetOpinionTypeById(ByVal OpinionTypeID As Long) As OpinionType Dim opinionTypev As OpinionType = OpinionType.GetOpinionTypeByID(OpinionTypeID)Return opinionTypev End Functionfunction GetOpinionTypeByID(OpinionTypeID){ PageMethods.G...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Help with the JSON serialization of an object that gives error: "a circular reference was detected while serializing an object of type: Poll
I am very new to AJAX and also pretty green in Javascript also. I am doing a remote call to a page method and trying to retreive a Poll object. While trying to pass this object to my javascript callback fuction I get the error:error: "a circular reference was detected while serializing an object of type: Poll. The problem is with this property: 'Options' . If I remove this property then it works fine. That property retreives from the Option object a list of child objects of the Poll object which are the Options (poll options). I must ask, is there something I ...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

Why do I have to type "data.DataTable" instead of "DataTable"?
I've been developing c# projects and now need to develope one in vb.  (dont ask why) All I wan to do is decalre dim data as DataTable but I'be being forced to decalre as dim data as data.dataTable?   Why is it so????       Do you have a using(C#)/Imports(VB) statement for the System.Data namespace in your file? The new refactoring tools should give you the option to add that if you delete the "Data." portion of that declaration (assuming you have the refactoring support for VB installed).Andrew L. Van Slaarsvanslaars.net VB is also case insensitive, so y...

How to adopt: Dim rowValues As Object() = {"","",""}?
Hi guys! I'm trying to adopt the code from the Editable Data Grid template. My underlying table has 3 columns: 1st: int(4), identity, autoincrement; 2nd:datetime(8); 3rd:varchar. What do I need to specify in Dim rowValues As Object() = {"","",""} instead of the first and second "" to get rid of the System.FormatException: Input string was not in a correct format… Thanks ...

"reference to" and "procedure of"
Hi, What is the difference between these two definitions: TThreadMethod = procedure of object; TThreadProcedure = reference to procedure; Please can you try to explain simply :) Thank you, BP. "Mehmet Fide" <off@b.net> wrote in message news:426398@forums.embarcadero.com... > > What is the difference between these two definitions: > > TThreadMethod = procedure of object; Defines a procedure or function signature that must be a member of a class, do for example: type TMyClass = class private MyMethod: ThreadMetho...

A circular reference was detected while serializing an object of type "System.goblaization.CultureInfo"
Hi all,  I am trying to call a webservice through javascript to return a dataset to bind it to a datagrid on the client side.  I am using a scriptmanager and registered the service by setting the service path. I am calling a method on a Textbox  onKeydown event to call the webservice method. The web service is returning the a data set. But the problem is am geting an exception stating the following   The server method 'GetDataSet' failed with the following error: System.InvalidOperationException-- A Circular reference was detected while serializing an obj...

"Me" is better than "You"
Yes I know, strings are frozen. But let me talk about it, I really can't get through the idea of a PC talkin to me. I consider my PC as an extension of myself, not a dumb companion who addresses Me as You. Yes there are times when I get angry with Him while I work and get wrong calculations etc.., but it really is my fault, Me using wrong istructions and eventually wanting to find someone else to blame, but it's Me. And yes, I consider Thunderbird my mail program, reading my mail on my PC as Me. So I personally like to have Me in the header bar as a compact address ...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

Web resources about - Web Methodst that returns DataTable gives me exception error " "circular reference was detected while serializing an object of type"" - asp.net.ajax-discussion

Resources last updated: 11/22/2015 9:05:46 AM