how to run javascript from c# code ?
- by dotnetcoder
I have a webrequest that returns a html response which has form inside with hidden fields with some javascript that submits the form automatically on pageload ( if this was run in a browser).
If I save this file as *.html and run this file in browser , the java script code automatically posts the form and the output is excel file.
I want to be able to generate this file from a c# code which is not running in broswer.
I tried mocking thr form post but its complicated and has various scenarios based on the original webrequest querystring. any pointers.... i know its not possible to probably run JS code that posts the form - from within c# code but still thought of chekcing if someone has done that.