How to execute a java script function in code behind using "VsaEngine"
1) My.js file content
function JS(){
var s=5+5;
}
2) Then how to execute it code behind using "VsaEngine"
here i use VsaEngine that run for me
class abc{
public static object Evaluate(string myExpr)
{
var engine = VsaEngine.CreateEngine();
return Eval.JScriptEvaluate(myExpr, engine);
}
}
Then i run the function it work for me
Response.Write( abc.Evaluate(*5+5").ToString());
that is run
and print 10
...
Go to the complete details ...