Substitute For Microsoft Script Control

  • Thread starter Thread starter Derek Hart
  • Start date Start date
D

Derek Hart

I am using the Microsoft Script Control on a VB.Net winforms form, and I use
it to evaluate text based calculations that come from a database. For
example, it evaluates "1+1" or "True And False Or True". It does that with
code that looks like the following:

If myForm.fScriptControl.ScriptControl1.Eval("1+1") = 2 Then Return True

I now need this type of functionality to be used in web services, and I
cannot figure out how to use this script control separate from placing it on
a form. I cannot call a form with web services. Should there be a way to use
this scripting directly?

Derek
 
it is here as an attachment

use :

Dim calc As New mcCalc()

txtAnswer.Text = calc.evaluate(txtExpression.Text)
 
Back
Top