Visual Basic .NET » Web Forms
DataRow as a result has no properties as namevalue -- esanchezfo --


Hi,

I´m returning a DataRow from an AjaxMethod (like GetCitizenStatus) but int the client the result is only an array. Before, in the version 5.x of AJAX library, this returns an array with name relations.

For example, before with 5.x this works for returning a DataRow:
alert (result.value
) is 1.

But now with the last version:
alert (result.value
) is 1.

Please is urgent because I support the forms with one dimension queries with DataRow results.

Thanks.

-- INeedADip --


Now I'm not sure but wouldn't it be:

alert(res.value
)

ID being the property and "value" being the object?

-- esanchezfo --


This is the idea:

You can have an array with associated names as references to your values, for example:
var myArray = new Array ();
myArray
= 1;
myArray
= 2;
myArray
= "Hi";

and you can use it: alert (myArray
);
and the result is: 1

This works before with AJAX version 5.x, a DataRow was returned in the client as an array like in the previous example. Then you can address the elements of the array with the name of the elements of the query.
Now in 6.x version this array is only a common array, you use something like:
myArray

instance of myArray


In fact the result is the same with integer index; but the design of the code is very affected with the order of the elements and the flexibility is destroyed, if you add one field all fails...
Thanks.

[Submit Comment]Home