Hello all,
I'm very new to ASP.net, i have created an function
I call the function like
But i dont get any result back, off course I'm forgetting something,but I don't see what.. Can anyone help me?
I'm very new to ASP.net, i have created an function
Code:
Public Function Margin(ByVal Retail As String, ByVal Dealer As String) As Long
If Retail = "" Then
Exit Function
Else
Dim RetailAmount As Long = CLng(Retail)
Dim DealerAmount As Double = CLng(Dealer)
Dim percentageSum As Double = RetailAmount - DealerAmount
Dim Inbetween As Double = percentageSum / Retail
Dim marginpercentage As Long = Mid(CStr(Inbetween), 3, 2)
Dim marginresult = CStr(marginpercentage)
End If
End Function
Code:
lblMarge.Text = Margin(dtrSelectArticles("RetailPrice"), dtrSelectArticles("DealerPrice"))
Comment