How do you get the value of javascript?
-
In javascript, the code has multiple performance challenges.
The C# program needs to read one of the parameters.
For example, javascript code has the following functions:app.log("регулярное выражение", /\w+\d+/gi, Date.now()); app.log({'id':1, 'value':123}); app.log("json array", [[1,2,3], [3,2,1]]);
In the C#, you need to read javascript code, find the challenges to the functions, and get, respectively:
"/\w+\d+/gi" "{'id':1, 'value':123}" "[[1,2,3], [3,2,1]]"
Regex can be used for this, but regular expressions will be quite complex.
Maybe there's another way without using regular expressions?
-
Transmit the data from Javascrip to sysarp, for example:
http://www.codeproject.com/Answers/708709/Pass-javascript-variables-value-to-Csharp-code-beh#answer2
https://softwareengineering.stackexchange.com/questions/122357/how-should-data-be-passed-between-client-side-javascript-and-c-code-behind-an-a
Line methods may be used to extract values, such as: http://www.dotnetperls.com/substring ♪ http://www.dotnetperls.com/split ♪ http://www.dotnetperls.com/between-before-after