You weren't too specific about whether this call was being made on the
client side, or the server side. My assumption was on the client side,
hence my response.
If you are calling this from a server-side ASP.NET page, then you need
to change your interop declaration in such a way so that it matches the
number of dimensions that you are trying to pass ([,] for a two-dimensional
array, [,,] for three, etc, etc).
If this number is variable, then I believe you can declare it as Array,
but I don't know how well interop will handle that declaration.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Richard Lewis Haggard" <HaggardAtWorldDotStdDotComwrote in message
news:Og****************@TK2MSFTNGP05.phx.gbl...
Thank you for your response. However, you've addressed a question that was
not asked. There's not the slightest bit of trouble returning an array
from the C# interop assembly to the ASP page. After all, from the ASP
point of view, the C# assembly is a COM server. That's the point of the
interop assembly. In any case, that was not my question. My question was
going the other way. How does one format up an array from an ASP page,
using either Javascript or VBScript or a combination of the two, such that
the C# interop can receive the array argument as type object[].
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote
in message news:u5**************@TK2MSFTNGP02.phx.gbl...
>Richard,
And how are you expecting to pass that array to ASP.NET? The only way
you can do this is to set form values which will be passed on a post.
To that end, you can create a hidden field in your form which you set
to a string which you can then parse on the server side to recreate your
array.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Richard Lewis Haggard" <HaggardAtWorldDotStdDotComwrote in message
news:OA**************@TK2MSFTNGP02.phx.gbl...
>>>I am trying to create multi-dimensioned arrays in conventional ASP pages
and pass these arrays as arguments to functions that are in a C# interop
assembly. ASP complains because it doesn't recognize that the created
array is the same as the declared interface argument.
The C# function is expecting to receive a 2 dimensioned array and is
declared like this:
public object[] InteropFunc( string s1, object[] arValues );
What should the ASP side look like in order to call into the C# interop
function?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com