Pass Array From C# COM object to JavaScript? -


Similar to but in C #.

I have a COM control that returns JavaScript to an array of strings. It seems JavaScript slang understands what I am doing and the array in JavaScript is always undefined.

Javascript:

  Try {keystore.openKeyStore ("MY", true, wrong); Var fNames = new array (); FNames = keystore.getAllFriendlyNames (); Document.getElementById ('equals'). InnerHTML = fNames [0]; } Hold (error) {document.getElementById ('err'). InnerHTML = err.description; }  

fNames [0];

C #:

  This output for the public 'undefined' object [] getAllFriendlyNames () (if!! KeystoreInitialized) throw a new exception (" Store has not been started "); X509Certificate2Collection allCerts = certificateStore.Certificates; Int storeSize = allCerts.Count; if (storeSize == 0) throw a new exception (" The empty key store could be opened using the wrong keystore name. "}; Object [] favorable name = new object [archive size]; for (int i = 0; i  

I have both object arrays and string

You can make your data Jason and disassembly of the customer You can try to do the serial. Json is built in json functions I have done it with more complex objects , But not with string arrays, although I bet it will work as easily.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -