how to run javascript from .NET code ?
Posted
by dotnetcoder
on Stack Overflow
See other posts from Stack Overflow
or by dotnetcoder
Published on 2010-04-16T00:37:30Z
Indexed on
2010/04/16
0:53 UTC
Read the original article
Hit count: 280
c#
|JavaScript
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(excel) 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.
© Stack Overflow or respective owner