Without using a WebBrowser control, how could I execute a JavaScript function, that is decoupled from any browser DOM dependencies, in a C# application? I am investigating implementing validation rules only once, for both server and client validation. See this question for reference if you like. Are there any JS interpretor libraries I could use?
Addendum: My goal here is to automatically deploy and invoke exactly the same validation logic on client and server, without communication between the two during the actual validation. So, ideally I would code my validation logic in JavaScript, and render that to the page. Alternatively, I could code my logic in C#, convert that to JavaScript using Script#, and render that to the page.
I don't want separate validation functions being maintained client and server side, and I don't want AJAX calls to server validation functions, and I don't want client only or server only validation.