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

Consume Result of .NET Function Returning object for a class in Classic ASP

P: 1
I have function like this in .NET

Expand|Select|Wrap|Line Numbers
  1. Public Class P
  2.     Public Function GetObjectForMyClass(ByVal _MyClass As MyClass) As MyClass
  3.         _MyClass.Name="Mahi New"
  4.         Return _MyClass
  5.     End Function
  6. End Class
Now I have the following Classic ASP Page:
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim P
  3. Dim MyClass 
  4. Set P = Server.CreateObject("Project.Assembly.Namespace.P")
  5. Set MyClass = Server.CreateObject("Project.Assembly.Namespace.MyClass")
  6. MyClass.Name="Mahi"
  8. MyClass= P.GetObjectForMyClass(MyClass)
  9. ...
  10. ...
  11. ...
  12. %>
this giving error like this:

Microsoft VBScript runtime error '800a0005'

Invalid procedure call or argument: 'GetObjectForMyClass'

I also used like the below to retrieve the object but it is also not working.

set MyClass= P.GetObjectForMyClass(MyClass)

Thanks in advance for your help.
Jul 22 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.