Loading ...
Sorry, an error occurred while loading the content.

Assigning C# Array to JavaScript Array

Expand Messages
  • amitrami3
    How do I assign C# to JavaScript Array. I have a method in C# RetrunStringArray() which returns string array. I am assigning array like below: var
    Message 1 of 1 , Jun 5, 2004
    • 0 Attachment
      How do I assign C# to JavaScript Array.

      I have a method in C# RetrunStringArray() which returns string array.

      I am assigning array like below:

      var javaScriptArray = ObjectName.ReturnStringArray(); --- (1)

      I tried (1). But it is not assigning. When I am trying to print the
      typeof(javaScriptArray) then it prints "object".

      I also tried : var javaScriptArray = new Array();
      javaScriptArray = ObjectName.ReturnStringArray();
      This is also not working.

      Please let me know if anyone has any idea about this. Thanks.

      -Amit
    Your message has been successfully submitted and would be delivered to recipients shortly.