Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2005

Tip: Looking for answers? Try searching our database.

Passing an ArrayList from C# .NET via COM to javascript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martijn Remmen - 29 Apr 2005 12:14 GMT
I already saw this question passing by in the news group, but I could not
make up answer from it.

I have an object say TestObject that has a public method (only to explain
the problem):

class TestObject
{
   private ArrayList mAL;

   public TestObject()
   {
   }

   public ArrayList GetArrayList()
   {
       return mAL;
   }
}

I expose this method via a COM Interface to ASP which uses server-side the
javascript language.

When I use

var oTestObject = Server.CreateObject("TestObject.TestObject")
var al = new Enumerator(oTestObject.GetArrayList())

I get only one element of the ArrayList back, and their are two objects
contained in the ArrayList. When I call the same object from a .NET program
(without using COM) I do get 2 objects.

Does anyone know how to solve this?

Thanks in advance,

Martijn Remmen
Martijn Remmen - 29 Apr 2005 13:47 GMT
It seems that only the first object is removed. Because when I add a row in
the database (and I've got a total of three objects) I get two objects when
using COM and three objects in the .Net application.

Has someone else seen this behavior before?

Martijn Remmen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.