views:

159

answers:

0

Guys,

I’m having difficulty referencing one main VB file from a new vb file. Here's the problem - the code file is ancient, and runs on ASP.NET 1.1. It runs without being compiled to a DLL, and changes regularly. for that reason, I'd rather not compile either New Person or Old Person to a DLL.

A default page look something like this.

Inherits="MyOldPersonClass" Src="bin/MyOldPersonClass.vb"

A new page I'm using look something like this.

Inherits="MyNewPersonClass" Src="bin/MyNewPersonClass.vb"

The class name I wish to reference is for example MyOldPersonClass – and I'm trying to reference it inside MyNewPersonClass, so I can grab older methods.

Imports MyOldPersonClass
Dim objNewPerson as new MyOldPersonClass –doesn’t work

I’ve tried System reflection bits and bobs

Dim ass As Assembly = Assembly.LoadWithPartialName("MyOldPersonClass")

Which compiles but gives object reference errors.

I’m trying to get a reference to some of the methods defined in MyOldPersonClass.vb, without copy pasting them into MyNEWPersonClass.vb