This is a migrated thread and some comments may be shown as answers.

call dll in javascript ??

3 Answers 889 Views
Getting started with ASP.NET
This is a migrated thread and some comments may be shown as answers.
hendy
Top achievements
Rank 1
hendy asked on 26 Mar 2007, 09:21 AM
Dear friend,
 
1.
we have a dll from a card reader...
we encapsulate this dll into a VB .NET Class Library...
and we compile it into ACR120.dll
 
2.
this VB .NET Class library has events, methods, also timer function...

3.
the card reader will be connected in client computer..
Since it's on client side, i can not use ASP .NET to call and use the Class Library
 
4.
i asked in some forums, some suggested AJAX, some suggested JavaScript...
but nobody gives sample code..
 
5.
i don't know how to call this Class Library using JavaScript or AJAX...or whatever ?
i try to use object tag but it does work...
......
  <object id="ndcObj" classid=file:///C:\Inetpub\wwwroot\EventACR120\DLL\ACR120DLL.dll height="356" width="367" VIEWASTEXT>
  </object>
.........
 
6.
somebody suggested me to use ActiveX control in client side programming ,
but i can not find ActiveX control project in Visual Studio .NET 2003....
i can only find ClassLibrary and Web Control Library for this purpose but no ActiveX Control.........
 
Pls help me .
 
Thank you,
hendy
 
 

 

3 Answers, 1 is accepted

Sort by
0
Johan
Top achievements
Rank 1
answered on 26 Mar 2007, 09:49 AM
ACR120DLL.dll is most probably a COM / ActiveX library. What you need to do first is to create a .NET wrapper which can execute calls against this library. This can be server-side VB.NET code - just make sure you have a method which can call the library.

Then, client-side, drop an asp:button control and wrap it inside rad AjaxPanel. In the server-side OnClick event of the button, call the method responsible for calling the respective DLL method.


            <rada:RadAjaxPanel
                id="RadAjaxPanel1"
                runat="server" >
                    <asp:Button runat="server" ID="Button1" Text="Some Text" OnClick="ButtonClick" />                  
            </rada:RadAjaxPanel>
       
         protected void ButtonClick(object sender, System.EventArgs e)
        {
        // call your DLL here
         }


0
Raufrz
Top achievements
Rank 1
answered on 13 Aug 2007, 01:21 PM
Dear friend
I read your comment about  ACR120.dll for cart reader.
I write web application.Application works with kart reader. Every client also works with kart reader. I want to install .dll to client mashine. But I cannot get dll from client side.

If you solve this problem could you help me please?
raufrz@gmail.com
0
punitharaj singaram
Top achievements
Rank 1
answered on 03 May 2010, 09:54 AM
i have the same problem ...
i have one dll file that dll  file has lot of methods and one of the method retrieves a local COM Port details
i try to get Com Ports details from local machine but it shows server COM Port details

And i followed ur comment but still it shows only server side result
am using this code in aspx design page

<body>  
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
          <asp:Button runat="server" ID="Button1" Text="Some Text" OnClick="ButtonClick" />                  
          <asp:DropDownList ID="ddPorts" runat="server" Width="246px">
        </asp:DropDownList>
        </telerik:RadAjaxPanel>
    </form>
</body>
my code behind Code ...

protected void ButtonClick(object sender, System.EventArgs e)
        {
       //here my code is working but shows Server details
         }

Tags
Getting started with ASP.NET
Asked by
hendy
Top achievements
Rank 1
Answers by
Johan
Top achievements
Rank 1
Raufrz
Top achievements
Rank 1
punitharaj singaram
Top achievements
Rank 1
Share this question
or