ASP.NET - Calculate Math Expression from Textbox -


i'm developing asp.net application , need calculate maths expressions

16+25*(15.38-12.16) 

which entered in text box control , result in other text box or label or wherever.

i tried of these, not of https://stackoverflow.com/questions/tagged/equation+c%23

is there possible way it?

you might able use datatable.compute() can handle simple equations. should work:

c#

private double calcequation(string equation) {     datatable temptable = new datatable();      var result =  temptable.compute(equation, ""); } 

vb.net

private sub calcequation(byval equation string)      dim temptable new datatable()      dim result object = temptable.compute(equation, "")  end sub 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -