Saturday, March 24, 2012

Working with DLLs

Hello there, I just downloaded Visual Web Developer 2005 ExpressEdition a few months ago and went through a few of the tutorials, I'vealways been microsoft savey, and have taken a few years of Visual basiccourses. Although I have never really worked with DLL's in a webpagebefore, so I am wondering if someobody can point me into the rightdirection, maybe a timeline of what I should learn or setup. I amworking with already compiled DLL files I just need to learn how toimplament them into my website, I've searched all over the web don'treally know the correct terminology and haven't found much! I didn'teven find anything here either.
Thanks! Hope to hear from somebody soon.
M@dotnet.itags.org.
To work with already compiled dll files just add them to your apps \bindirectory and then make a refrence to them with visual studio 2005.
As for learning:
1. C# or VB.NET
2. SQL Sever Express ( or some form of SQL SERVER 2005)
- Common CRUD SQL ( insert, update,delete)
- DML
- Sprocs
3. ADO.NET Data Access in 2.0
4. ASP.NET 2.0

Thanks for the reply!
I have added the dll to the bin folder in VS2005, by going through addreference file, and finding the DLL in the list. Then it automaticalyadded it to the bin file in my website folder, but I don't know how tomake a reference to the dll. All I've really done so far is made aspxpages with forms hoping to interface it with the functions within theDLL, I know some VB and SQL, but I dont know what DML and Sprocs are.
I tried finding some example code but it seems everytime I search forworking with DLL's in ASP I get all the source and examples on how tobuild DLL's not implament and use them. Are there any books out thereyou recommend, or should I explain what it is I am trying to do first?

All you need do is add a using statement to the assembly in any of thecode files you want to ref the assembly. If you just type usingand some of the assembly name intilisense will find this for you.

So if I want to use the System.XML assembly.
using System.Xml;

If you want to use a DLL in an ASP.NET page,
and the DLL is in the /bin directory, just use this :
<%@. Import Namespace="YourDLLsNamespace" %>
in your ASPX page.
Then, you can instantiate the DLLs classes with :
Dim whatever as New YourClassname()

0 comments:

Post a Comment