Using VB.NET Objects in regular ASP Pages
1. Create a file called Class1.vb and placed this code in it:
Public Class SampleClass Public Function GetMyName() As String Return "This is from the .NET component" End Function End Class
2. Create a keyfile with the strong name (sn) utility:
sn -k demokey.snk3. Compile the VB app with:
vbc /t:library /keyfile:demokey.snk class1.vb4. Install the library into the GAC with:
gacutil -i class1.dll5. Use RegAsm to register it as a COM class:
regasm /tlb:class1.tlb class1.dllTest it in ASP with:
<%
set x = server.CreateObject("SampleClass")
response.Write x.GetMyName()
%>