Winter2OO1
May 15th, 2005, 11:18 PM
I have 2 classes
Public Class One
Sub MessageOne
Response.Write("I am from Class One")
End Sub
Sub OtherMethod
'Do Something here
End Sub
End Class
Public Class Two
Sub MessageTwo
Response.Write("I am from Class Two")
End Sub
Sub OtherMethod
'Do Something here
End Sub
End Class
Now I create new class and I want to call method MessageOne and MessageTwo.
Public Class MyClass: Inherits System.Web.UI.Page
Dim ClassOne As New One
Dim ClassTwo As New Two
ClassOne.MessageOne()
ClassTwo.MessageTwo()
End Class
When I compile, I got error message "Type 'One' is not defined". Note: Class One and class Two are not in the same directory as MyClass. This is ASP.NET.
Thanks in advance
Public Class One
Sub MessageOne
Response.Write("I am from Class One")
End Sub
Sub OtherMethod
'Do Something here
End Sub
End Class
Public Class Two
Sub MessageTwo
Response.Write("I am from Class Two")
End Sub
Sub OtherMethod
'Do Something here
End Sub
End Class
Now I create new class and I want to call method MessageOne and MessageTwo.
Public Class MyClass: Inherits System.Web.UI.Page
Dim ClassOne As New One
Dim ClassTwo As New Two
ClassOne.MessageOne()
ClassTwo.MessageTwo()
End Class
When I compile, I got error message "Type 'One' is not defined". Note: Class One and class Two are not in the same directory as MyClass. This is ASP.NET.
Thanks in advance