Results 1 to 5 of 5

Thread: DLL through ASP.NET

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    India
    Posts
    53

    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.
    Yash

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    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).

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2004
    Location
    India
    Posts
    53

    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.
    Yash

  4. #4
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    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
    Last edited by nemaroller; Apr 27th, 2005 at 09:25 AM.

  5. #5
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Malaysia
    Posts
    345

    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.
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width