By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,508 Members | 1,823 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,508 IT Pros & Developers. It's quick & easy.

How can ASP page call a C# method using "ArrayList" parameter???

P: n/a
sd
QUESTION: How can my ASP page - which uses language="VBScript" - pass a
"System.Collections.ArrayList" object - as a parameter - to a C# method in
the middle-tier ???
----- Is it possible at all? - if not, what work-a-round is there?

I have no issues passing "string" parameters successfully to other methods
in the same "middle-tier" - i.e., C# - object...

It just seems to be the "ArrayList" parameter that is at issue.

Note also that I can easily create, manipulate, and display the contents of
a System.Collections.ArrayList within the ASP page itself (i.e., via
"response.write", etc).

But, when I do a "createObject" and attempt to invoke the method that
requires the ArrayList parameter, I get an error: "Microsoft VBScript runtime
error '800a0005' Invalid procedure call or argument"

Am I required to do something differently in order to pass this
"System.Collections.ArrayList" object - as a parameter?

Again, I have no issue when passing regular "string" objects to methods in
the same "middle-tier" object (again, csharp)

Thanks for any help.

sd

IMPORTANT[?]: my environment is sort of a hybrid of ASP (*not* ASP.NET) with
a .NET supported middle-tier (i.e. uses C# objects)...

(FWIW - I have looked up and down the internet for information on this
issue, but, to no avail... Feel free to let me know if I am characterizing
the problem incorrectly - thx!)

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I doubt that is possible as ArrayList is a .net type. You might be able to
pass an array of strings though.

"sd" <sd@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
QUESTION: How can my ASP page - which uses language="VBScript" - pass a
"System.Collections.ArrayList" object - as a parameter - to a C# method in
the middle-tier ???
----- Is it possible at all? - if not, what work-a-round is there?

I have no issues passing "string" parameters successfully to other methods
in the same "middle-tier" - i.e., C# - object...

It just seems to be the "ArrayList" parameter that is at issue.

Note also that I can easily create, manipulate, and display the contents of a System.Collections.ArrayList within the ASP page itself (i.e., via
"response.write", etc).

But, when I do a "createObject" and attempt to invoke the method that
requires the ArrayList parameter, I get an error: "Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument"

Am I required to do something differently in order to pass this
"System.Collections.ArrayList" object - as a parameter?

Again, I have no issue when passing regular "string" objects to methods in the same "middle-tier" object (again, csharp)

Thanks for any help.

sd

IMPORTANT[?]: my environment is sort of a hybrid of ASP (*not* ASP.NET) with a .NET supported middle-tier (i.e. uses C# objects)...

(FWIW - I have looked up and down the internet for information on this
issue, but, to no avail... Feel free to let me know if I am characterizing
the problem incorrectly - thx!)

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.