Hi,

the problem is the use of the type "object". If I get a [1,2,3,4,5]
json string what data type should it be? int[] long[] double[] ...?

You can use:
  public int SaveData(int[] analysisElementValues)

Or...
  public int SaveData(IJavaScriptObject analysisElementValues)
  public int SaveData(JavaScriptArray analysisElementValues)

Regards,
Michael




On 7/12/06, JasonBunting <[EMAIL PROTECTED]> wrote:
>
> JavaScript code:
>
>   var foo = [[1,1],[2,2],[3,3],[4,4]];
>   ASP.mypage_aspx.SaveData(foo);
>
> C# code:
>
>   [AjaxMethod()]
>   public int SaveData(object analysisElementValues)
>   {
>      return 0;
>   }
>
> The problem: if I call GetType() on the analysisElementValues variable,
> it indicates it is a String. Why?! I expected this to be converted to
> an array of arrays of integers (int[][]). Please either tell me how I
> can get that, or add this to a bug fix. It would seem that AjaxPro.net
> should know how to convert a native javascript array to a C# array,
> since this is such a very basic data type.
>
>
> >
>


-- 
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz/
http://www.schwarz-interactive.de/
mailto:[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to