Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 16013

String with parameters to expression

$
0
0
Hi Guys,
im new here.

I have form with 2 textboxes (txt1,txt2) and 1 button (btnEnd)

I need help with code looking something like this:

Private Sub btnEnd_Click(sender As Object, e As EventArgs) Handles btnEnd.Click

Dim i As Integer = 3
Dim j As Integer = 4
Dim str As String

str = txt1.text ' txt1.text = i + j if I write 3 + 4 the result is ok 7. But with "i" and "j" don't work.
txt2.Text = AxScriptControl1.Eval(str)

End Sub
I' had trying with Script control but isn't work.
How to send parameters to the equation?

Viewing all articles
Browse latest Browse all 16013

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>