Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am beginner i want to add dll file in my website.
can anyone tell me how to create dll file and how use dll fiel in website
Posted

In Visual Studio:

  1. To create a DLL file:

    1. Go to File -> New -> Project
    2. Select 'Class Library'
    3. Write the code for your DLL file

  2. To add the DLL file as reference to your ASP.NET website:

    1. Open the Solution Explorer
    2. Right-click on the References of your ASP.NET website
    3. Click on 'Add Reference...'
    4. Go to 'Solutions' (in VS 2012/2013, in VS 2010, go to the Solutions tab)
    5. Select the project of your DLL file
    6. Click on 'OK'


Hope this helps.
 
Share this answer
 
Comments
Nandakishore G N 28-Oct-13 9:03am    
good answer... ProgramFox..My 5
Thomas Daniels 28-Oct-13 9:04am    
Thank you!
Arvind Labhi 28-Oct-13 9:08am    
thanks for this
now i want to use dll file in website means how to use this library in or how to call this library on website pages
Thomas Daniels 28-Oct-13 9:19am    
Like this:
<small>
using NamespaceOfYourDllFile; // add this at the top of your code file
</small>

And in any method or class of your website:
<small>
ClassOfYourDllFile c = new ClassOfYourDllFile();
// do stuff with this object
</small>

So, after adding a reference to the DLL file, you just can use its namespace and classes like any other namespace/class.
To create one you would add a new project, do all your code and compile it. To add to your website you just right click on your website in Visual Studio and choose Add Reference and browse to your dll.
 
Share this answer
 
Here is good reference with good explanations.

http://www.c-sharpcorner.com/uploadfile/mahesh/dll12222005064058am/dll.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900