I am not very familiar with VBScript. But an object in managed world are
actually reference types. Is there a way to pass in an object pointer to
the method in VBScript?
--------------------
[quoted text, click to view] >From: "Lidong Cheng" <LidongCheng@hotmail.com>
>Subject: What is wrong with the code to access .NET Assembly from ASP page?
>Date: Tue, 29 Jul 2003 16:01:43 -0400
>Lines: 37
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <ehY67tgVDHA.1052@TK2MSFTNGP09.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.interop
>NNTP-Posting-Host: host-194.nbc.netcom.ca 66.46.143.194
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.interop:17590
>X-Tomcat-NG: microsoft.public.dotnet.framework.interop
>
>Hi,Everybody
>
>Can somebody help me find out what 's wrong with the code?
>Can I pass a .NET type as a parameter to another .NET type's method? or
how?
>
>see below:
>=================================================
>.NET Server C# code:
>namespace XYZ.BusinessLogic
>{
> public class Document
>
> public void Update(XYZ.Model.DocumentInfo docInfo,int userid)
> {
> ...
> }
>}
>----------------------------------
>ASP Client VBScript Code:
>Set Doc=Server.CreateObject("XYZ.BusinessLogic.Document")
>Set DocInfo=Server.CreateObject("XYZ.Model.DocumentInfo")
>UserID=1
>DocInfo.Title="Test"
>...
>Doc.Update DocInfo,UserID
>-----------------------------------
>Error Message I got after I run the asp page:
>Error Type:
>Microsoft VBScript runtime (0x800A0005)
>Invalid procedure call or argument: 'Doc.Update'
>==================================================
>
>Thank in advance
>
>Lidong
>
>
>