I'm pretty new to dot net and I'm stumped. I've created a nice little dll written in vb.net called cybersource.dll that interacts with the CybersourceWS dll. It has a bunch of properties and methods I use to make transactions. I also have a web form called
reservations.aspx that has a code behind file called resevations.aspx.vb. The from is pretty standard stuff to collect the credit card billing info.
I've complied and copied my cybersource.dll and cybersource.xml and just for good measure the CybersourceWS.dll to the same folder as the reservations.asp and reservations.aspx.vb.
It would be really swell if someone could explain to me, a noob, how to call this dll from my aspx.vb page so I can use the methods and properties, but I can't figure out how.
How is this done? And please in detail I'm a noob.
Thanks for your reply. I will give it a try. One more bit of info I need. How do I acutally reference my dll in my aspx.vb file? do I use imports ? do I use system.create()?
Yes this is a web site I guess. I hand wrote these pages in notepad++ to interact with my dll.
WebRuss
0 Points
19 Posts
Using a dll with my web form
Sep 03, 2009 11:12 PM|LINK
Hello
I'm pretty new to dot net and I'm stumped. I've created a nice little dll written in vb.net called cybersource.dll that interacts with the CybersourceWS dll. It has a bunch of properties and methods I use to make transactions. I also have a web form called reservations.aspx that has a code behind file called resevations.aspx.vb. The from is pretty standard stuff to collect the credit card billing info.
I've complied and copied my cybersource.dll and cybersource.xml and just for good measure the CybersourceWS.dll to the same folder as the reservations.asp and reservations.aspx.vb.
It would be really swell if someone could explain to me, a noob, how to call this dll from my aspx.vb page so I can use the methods and properties, but I can't figure out how.
How is this done? And please in detail I'm a noob.
Regards
WebRuss
code behind file noobie vb.net
andrewjboyd
Contributor
4426 Points
864 Posts
Re: Using a dll with my web form
Sep 04, 2009 01:31 AM|LINK
Drop your DLL's into the bin folder. .NET looks for DLL's in the Bin folder, followed by the GAC (Global Assembly Cache).
Also, a web application wouldn't require the *.aspx.vb files, while a web site does require *.aspx.vb (just a FYI)
================================================
Why catch a fish to feed someone, when you can teach them to fish and they can feed themselves
WebRuss
0 Points
19 Posts
Re: Using a dll with my web form
Sep 04, 2009 10:03 AM|LINK
Andrew
Thanks for your reply. I will give it a try. One more bit of info I need. How do I acutally reference my dll in my aspx.vb file? do I use imports ? do I use system.create()?
Yes this is a web site I guess. I hand wrote these pages in notepad++ to interact with my dll.
Regards
WebRuss
palsonjj
Member
44 Points
12 Posts
Re: Using a dll with my web form
Sep 04, 2009 10:20 AM|LINK
Yes. u should "imports" ur DLL and also create an object for that. now u can inherite all those properties n methods from ur dll..
Jj
:)
palsonjj
Member
44 Points
12 Posts
Re: Using a dll with my web form
Sep 04, 2009 10:21 AM|LINK
Yes. u should "imports" ur DLL and also create an object for that. now u can inherite all those properties n methods from ur dll..
Jj
:)
suthish nair
All-Star
15176 Points
3304 Posts
Re: Using a dll with my web form
Sep 04, 2009 10:45 AM|LINK
you refer this links:
How to Add and use a dll in asp.net.
http://www.codeguru.com/forum/showthread.php?t=358450&highlight=DLL
http://www.codeguru.com/Csharp/.NET/net_general/comcom/article.php/c6747/
My Blog
Me_Learner
Member
24 Points
25 Posts
Re: Using a dll with my web form
Sep 04, 2009 11:17 AM|LINK
If ur dll is written in .net then u can directly add reference to ur project of the dll that u need to use in ur application.
If ur dll is written in some other language then refer following links:
http://msdn.microsoft.com/en-us/library/26thfadc.aspx
palsonjj
Member
44 Points
12 Posts
Re: Using a dll with my web form
Sep 04, 2009 11:54 AM|LINK
Hi,Juz add reference tat DLL to ur project
and
imports "UrDLL"
''create an Object 4 DLL
dim obj as new "UrDLL"
now u can play with ur dll, usin...
obj.
Jj
:)
WebRuss
0 Points
19 Posts
Re: Using a dll with my web form
Sep 04, 2009 12:34 PM|LINK
Thaks for all your replies! I am sooooo close here...
I copied
Interop.CybersourceWSLib.dll
cybersource.xml
cybersource.pdb
cybersource.dll
to the BIN folder on the website.
Then in my aspx.vb file I did the following:
Imports cybersource Partial Class registration Inherits System.Web.UI.Page Private Shared objCyb As cybersource.CybersourceThat seems to work OK - well at least no error are generated.Now further down in my class I get an error
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click Dim ObjCyb as New cybersource ObjectCompiler Error Message: BC30205: End of statement expected.
On the above line.
What am I dong wrong?
palsonjj
Member
44 Points
12 Posts
Re: Using a dll with my web form
Sep 04, 2009 12:38 PM|LINK
mmm... dont Copy paste.. juz right click on the project in solution explorer, select Add Reference n select ur dll from Ur DLL's Bin Folder.k?
Nw, u can IMPORTS "UrDLL"
Jj
:)