Live Chat Icon For mobile
Live Chat Icon

How can I reference simple DLL which contains one class but has no namespace assigned to it in an .aspx page

Platform: ASP.NET| Category: Miscellaneous

You don’t need a namespace to reference it; anything in the bin folder is implicitly in the same namespace as the page being compiled. So if your class looks like this:


Public Class MyClass1
Public Sub New()
End Sub
 
public Function getTheName(byval strval as string) as string
Return 'Hello' + strval
End function
End Class

VB.NET


Dim mc As New MyClass1
Response.Write(mc.getTheName)

C#


MyClass1 mc = new MyClass1();
Response.Write(mc.getTheName);

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.