Call a .NET function that requires a .NET type from classic ASP

Please help me. I have been trying to overcome this problem from the last 2 days. But I can’t overcome.

I managed to set up the environment so that I could call the .NET method (via COM) from the classic ASP page.

Everything works as intended until I call the .NET method, which requires the .NET type.

So I have a method called SetTable Like Below

I have such a function in .Net

Public Sub SetTable(ByVal _City As City, ByVal _Country As Country)
          'doing some thing
End Sub

and I have an asp code:

dim CountryUtil, City, Country
set CountryUtil= Server.CreateObject("mydll.CountryUtil")
set City= Server.CreateObject("mydll.City")
set Country = Server.CreateObject("mydll.Country")
city.id= 123
city.property = "so and so"

Country.id= 123
Country.property = "so and so"

CountryUtil.SetTable(City, Country)

'I get this error here:

'Microsoft VBScript runtime error' 800a0005 '' Invalid call or procedure argument: 'SetTable'

Thanks in advance.

+5
source share
2

vbscript , - .

Set. SetTable ( ), "" (), .net City Country.

+2

vbscript , ( )?

CountryUtil.SetTable City, Country
0

All Articles