Newbie ASP.Net-- how to use external assemblies?

  • Thread starter Thread starter Jim Bancroft
  • Start date Start date
J

Jim Bancroft

I think (I know) I have a basic ASP.Net question. How can I use outside
components in an ASP.Net webpage? I know how to do it in ASP--
CreateObject() or CreateInstance() with the ProgID. However, I'm not sure
of ASP.Net's prefered way of going about the same task. A register
directive, maybe? TIA for pointing me in the right direction.

-Jim
 
Your question is confusing, because your title says "external assemblies"
and your message says "outside components." Assembly is a term for a .Net
assembly, while "outside components" is a generic term that could mean
anything from a C++ DLL to a COM object to a .Net assembly (no doubt I've
omitted a few other types of components).

If it's assemblies you want to use, just put them in your app's bin folder
and reference them. How you reference them depends upon your development
environment. If not .Net assemblies, you will need to use some form of
Interop, which is not a can of worms you should really want to open, unless
you absolutely have to.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Ok, I wasn't completely clear-- I've written a DLL in VB .Net, and I'd like
to access the contained components/objects from my ASP.Net pages. No
interop needed here. Could someone let me know how to go about accessing my
..Net components from within ASP.Net? Thanks again,

-Jim
 
In Visual Studio under your project right click on references --> Add
Reference. You'll be presented with a dialog box and already on the .Net tab
(which contains a list of assemblies registered in the GAC). Click the browse
button and select the .Net DLL that you want to reference. Click Ok and voila
- you can now reference the classes exposed by that DLL in your web app.

-Demetri
 
Again, it depends upon your development environment. What would that be?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
Back
Top