Link to home
Start Free TrialLog in
Avatar of straucha
straucha

asked on

In ASP.NET, Evaluate a formula at runtime that is stored in a table

Here's what I'm trying to do:

I have an asp.net page with 3 textboxes on it and one label that will display the answer.  Based on a selection that the user makes I want to be able to get a formula stored in a table that will tell how to calculate a total using the 3 controls as input.

Ex. Formula:  (Val(Textbox1.text) + Val(Textbox2.text) + Val(Textbox3.text)) / 3

The formula will have the real control names in it but the formula will look like above and will be stored in a SQL server table.  If it makes a difference I'm using VB and .NET 3.5.
Avatar of Ravi Vaddadi
Ravi Vaddadi
Flag of United States of America image

What is your question?
Avatar of straucha
straucha

ASKER

How do I dynamically evaluate a formula retrieved at runtime?
use java script for that.
how does your formula looks like ? (can you paste it here ?)

-Kusala
ASKER CERTIFIED SOLUTION
Avatar of Kusala Wijayasena
Kusala Wijayasena
Flag of Sri Lanka image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks,

    I'll give it a try!
Thanks, sorry it took me a little while.