i have writen a function in the vb class file and i am trying to read the function form the asp.net but it is showing an error  Error	13	Reference to a non-shared member requires an object reference.	can you help please i am new to this subject

elvin

Hi,
From the Error, I think you are calling that Function without creating an Instance. For example Consider the Class

Public Class A
    Public Sub Show()

    End Sub
End Class

This can be called as

Dim Obj as A
Obj = New A()

Obj.Show()

'But not
A.Show()

If you want access Show regardless of the Class use Shared keyword make it shared among all the instances.

Public Class A
    Public Shared Sub Show()

    End Sub
End Class

A. Show()

This may helpful or You can show your class and Function calling.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.