I am using the following to invoke a javascript function from a C# application with a WebBroser control
webBrowser1.Document.InvokeScript("function", new object[] { "arg" });
Is there any way to pass an object (other than string, double etc) as argument to the function test?
class SomeObject
{
int number = 0;
string str = "1234";
}
webBrowser1.Document.InvokeScript("function", new object[] { new SomeObject() });
The above resuslts in the javascript below typeof(args1) returns unknown
function function(arg1) {
alert(typeof(arg1));
}