-
DLL through ASP.NET
hi everyone
is there any way of making a .DLL using asp.net...i m trying to put some code in the DLL( not the .vb extension class)...and i will hook the code in 'codebehind' with the DLL.
i think DLLs r possible through c#, vb.net, win32 project and even VB has ActiveX DLL...but how to do it in asp.net
thnx
yash.
-
Re: DLL through ASP.NET
1) Right-click your 'SOLUTION' in the Solution Explorer, choose Add New Project, Class Library.
2) Put the code you want in there
3) In your Web project (NOT THE SOLUTION, and NOT THE CLASS LIBRARY YOU JUST ADDED), right-click References, then Add Reference...
when the dialog box appears, click the Projects Tab, select the Class Libary you just created (so that it appears in the bottom area of the dialog box, then click OK).
4) In any page you use your class library, you must put an Imports ClassLibrary1 (or whatever you named your libary).
-
Re: DLL through ASP.NET
thnx for the reply nemaroller..
but is this what we call as DLL...this file is with extension .vb...i have used these quite a lot in my project...but i m looking for the conventional .DLL files...can those be made somehow..
thnx again.
-
Re: DLL through ASP.NET
Well, no the dll does not have a vb extension.
It is managed code however, and I'm guessing your wondering how to use an existing umanaged dll within a .Net application. If you're instead wondering how to create a new dll in unmanaged code, well then you will have to use C++ to do so, and then add the existing item to your project.
http://www.codeproject.com/csharp/unmanage.asp
-
Re: DLL through ASP.NET
To make a Dll you write the code in .vb file...and then compile it.../t: (is used to specify that you want it as dll)
You can compile the VB.NET code with this:
vbc /t:library /out..\bin\SQLDb.dll /r:System.dll /r:System.Data.dll Database.vb
Then you can call the dll through your asp.net page by creating an instance of it.