There is no such problem by at least two important reasons.
First of all, there cannot be "type mismatch between VB and JavaScript", because JavaScript simply does not have the types in the same sense VB (whatever it is :-)) types are understood. JavaScript types are only 8 to 9 (one is implementation-dependent) and are described by strings: "undefined", "null", "string"… "object", (while .NET or non-.NET VB) allow any number of distinct types. See also:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof[
^].
The second reason is this: if you are using ASP.NET or any other Web technology (and also a number of other, non-Web technologies), you never have any exchange between JavaScript and server-side objects. Never. Instead, you just generate some JavaScript text on the server side and put it in HTTP response. A Web browser gets the HTTP response, parses and handle it accordingly, which ultimately may lead to execution of some JavaScript code.
You need to consider the JavaScript generated on server side as pure text. That's all.
Now, the above is the key to the solution. First of all, open the page in your browser, use View -> Page Source (or something like that, depending on your browser) and inspect
actually generated JavaScript text. Makes sure it is correct. If not, find out what's wrong is going on the server side, where you can use the debugger. That's all.
—SA