Groups | Blog | Home
all groups > dotnet faqs > january 2004 >

dotnet faqs : Calling VBNet functions from asp


(mail NO[at]SPAM localdrum.com)
1/31/2004 9:51:28 PM
I am generally doing what I need to using VB6 and .asp but want to avoid registering the DLLs (actually re-registering them on my providers server every time I make a change). I thought VB.net might be the answer but articles so far assume using asp.net with it.

As far as I can see the .aspx files don't support:
response.write MyClass.GetSomething(var1, var2,...).

If it is possible to do this OR if VB.net functions can be called from good old .asp files please let me know.

regards
Mike

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Gerry O'Brien [MVP]
2/2/2004 7:53:41 AM
Yes they can. They actually work a little better than VB 6 and COM
components because you do not have to re-register them everytime you make
changes to them.

Here's what you do.

1) Write your component that you want to access VB .NET. Copy it to an
appropriate location on your web server

2) In your ASP.NET code, add a reference to the component.

The code is now available for you to call. If you make changes to the
component later on, just overwrite the old component with the new one and
you should be all set. You may have to re-add the reference but that is all
that is required. The next time the page is requested after the new
reference is added, if will be compiled automatically the first time and you
will be all set to go.

Hope this helps.

Gerry O'Brien
Visual Developer .NET MVP

[quoted text, click to view]
registering the DLLs (actually re-registering them on my providers server
every time I make a change). I thought VB.net might be the answer but
articles so far assume using asp.net with it.
[quoted text, click to view]
ASP.NET resources...

AddThis Social Bookmark Button