Need an object reference

Ray at home

New member
Joined
Apr 27, 2003
Messages
1
Hi group,

Im stumbling my way through learning ASP.NET, as I am just a classic ASP programmer now. Im have the code below all in one aspx file, and it returns the error,

BC30469: Reference to a non-shared member requires an object reference.

Fine, I understand that. If I were coding a desktop application in VB (6, not .NET since I havent gotten to that point yet), Id first reference the module that the sub is in and call something like Module1.Subroutine1 or whatever. But, Im just coding all this in Notepad, and Im not creating any modules or anything like that, so Im not sure how to reference my sub that Im calling. If its just a public sub in the page, what is it a member of? Heres the code, basically.

Public Sub SubName()
code
End Sub

Public Structure StructureName
Public Something as String
etc.
Public Sub StructureSub(ByVal ID as Integer)
Call SubName() THIS LINE IS THE ERROR
End Sub
End Structure


Okay, so its telling me that I cannot just call SubName. I have to call Something.Something.Something.Something.SubName or something along those lines, correct? But what are those somethings? Can anyone help me with this?

Thanks a lot,
 


Write your reply...
Back
Top