Hi Justin,
I tried this way also. I put it in refrence library but whenever i m
trying to access class from that .dll file it gives me compiler error
saying
I m pasting the source code for the dll and the application too plzz
check it out and let me know.
This is Webform1.aspx file:
<%@ Page Language="VB"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="DOTNETMath" %>
<script runat="server" language="VB">
Sub Page_Load(sender As Object, evtArgs As EventArgs)
Dim MathComponent = New Operations()
Dim AddResult, SubResult As Single
AddResult = MathComponent.Add(CSng(FirstNum), CSng(SecondNum))
SubResult = MathComponent.Subs(CSng(FirstNum), CSng(SecondNum))
end sub
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</html>
----------------------------------------------------------
this is DOTNETMath.dll file:
mports System
Imports Microsoft.VisualBasic
Namespace DOTNETMath
Public Class Operations
Public Sub New()
MyBase.New()
End Sub
Public Function Add(ByVal A As Single, ByVal B As Single) As
Single
Add = A + B
End Function
Public Function Subs(ByVal A As Single, ByVal B As Single) As
Single
Subs = A - B
End Function
Public Function Mul(ByVal A As Single, ByVal B As Single) As
Single
Mul = A * B
End Function
Public Function Div(ByVal A As Single, ByVal B As Single) As
Single
If B = 0 Then
Div = -1
Else
Div = A / B
End If
End Function
End Class
End Namespace
-----------------------------------------------------------
Plzz try to run this and let me know. I m waiting for ur answer and tell
me the exact procedure to do it.
Thanks,
Alpesh
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!