Without using the WebBrowser control, how can I execute a JavaScript function that is separated from any browser DOM dependencies in a C # application? I examine the rules of validation only once, both for server verification and for the client. See this question for reference if you want. Are there any JS interpreter libraries that I could use?
Application: My goal here is to automatically deploy and invoke exactly the same validation logic on the client and server, without communication between them during the actual verification. Therefore, ideally, I would encode my validation logic in JavaScript and display it on the page. Alternatively, I could encode my logic in C #, convert it to JavaScript using Script #, and display this on the page.
I don’t want individual validation functions to be supported on the client and server side, and I don’t want AJAX to call server validation functions, and I don’t want the validation only on the client or server basis.
Profk source
share