473,756 Members | 2,383 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

sd
QUESTION: How can my ASP page - which uses language="VBScr ipt" - pass a
"System.Collect ions.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.Collecti ons.ArrayList within the ASP page itself (i.e., via
"response.write ", etc).

But, when I do a "createObje ct" 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.Collect ions.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
1 2691
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******** *************** ***********@mic rosoft.com...
QUESTION: How can my ASP page - which uses language="VBScr ipt" - pass a
"System.Collect ions.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.Collecti ons.ArrayList within the ASP page itself (i.e., via
"response.write ", etc).

But, when I do a "createObje ct" 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.Collect ions.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

77
5378
by: Jon Skeet [C# MVP] | last post by:
Please excuse the cross-post - I'm pretty sure I've had interest in the article on all the groups this is posted to. I've finally managed to finish my article on multi-threading - at least for the moment. I'd be *very* grateful if people with any interest in multi-threading would read it (even just bits of it - it's somewhat long to go through the whole thing!) to check for accuracy, effectiveness of examples, etc. Feel free to mail...
1
5963
by: Daisy | last post by:
error CS0117: 'System.Collections.ArrayList' does not contain a definition for 'Item' Only one answer in Google Groups, and I'm positive I'm using it correctly...! Posts is my ArrayList. I put in some posts:
2
4910
by: Serge Klokov | last post by:
Hi! 1. Please, help with example "paint on form by mouse" 2. Below is my example, but it clear the line after each Refresh()... how to fix? 3. How to draw the line in Mouse_Move event? private Boolean isCanPaint = false; private MouseEventArgs MouseEvent1;
12
4128
by: Jose Fernandez | last post by:
Hello. I'm building a web service and I get this error. NEWS.News.CoverNews(string)': not all code paths return a value This is the WebMethod public SqlDataReader CoverNews(string Sport) {
1
1784
by: Jack Addington | last post by:
I have a method that takes an array of nodes (UltraNode) as a parameter. I've got an arrayList of objects that I am trying to convert to UltraNodes and pass to the method but I cannot seem to get the syntax right. I thought I was able to go ArrayList.ToArray(typeof(UltraNode)) and be done with it. I then decided to just iterate through the ArrayList and build an array but I am having trouble there too.
6
2161
by: Vern | last post by:
I'd like to make the following a generic method that all my forms can call to validate all the fields on the form. So how do I pass the form object that is represented as "this" in the following code, and how do I retrieve the list of all controls and child controls on that form (since I don't think I can just refer to Controls). #region AnyFieldErrors private bool AnyFieldErrors() {
18
4743
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the class where only the "searched" property has a value. I expected to get the index into the arraylist where I could then get the entire class instance. However, the 'indexof' is never calling my overloaded, overrides Equals method. Here is the...
8
2640
by: GrandpaB | last post by:
I need to sort an Arraylist. The Arraylist is contained in classArt. The Arraylist contains objects that have been defined in a sperate class, objArt. I have attempted to implement the sort using IComparable, but I'm hopelessly lost. With the addition of "Implements ICompariable" and the "CompareTo" function the program will ont even compile. Any suggestion that you have would be gratefully welcomed. I am including the relevant code: ...
6
5535
by: Kevin Yu | last post by:
hi all is there a way to pass an interface as input parameter for a web method? since interface is not serializable, does that mean it's impossible to do that? Kevin
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.