Hi,
I am making a web request to a web page ("TestWebRequest.aspx") that
only has
a javascript like this
--------------------------------------------------------------------------------------------------------------------------------
<div>
<script type="text/javascript"><!--//<![CDATA[
var XYZ = {"pid":"123456789123456789","size":"728x90"}
/]]>--></script>
<script type="text/javascript" src="http://www.ExternalWebSite.com/
GetAds"></script>
</div>
---------------------------------------------------------------------------------------------------------------------------------
That Javascript is going make a request to an external website page,
creates a frame and populate that frame with an html code (
for example: an image and a text).
My question is: How can I get the HTML Code generated after the page
is render and execute
the javascript that is inside.
This is the piece of code I am using:
WebRequest request = WebRequest.Create("http://localhost/
ABC/TestWebRequest.aspx");
WebResponse response = request.GetResponse();
StreamReader sr = new
StreamReader(response.GetResponseStream(),
System.Text.Encoding.Default);
string content = sr.ReadToEnd();
sr.Close();
Response.Write(content);
The HTML code that I see is the HTML that contains the javascript. I
would like
to see the HTML of the page including the iframe generated by the
javascript that is inside the page.
Thanks for any tip or help.
Regards,
Leonardo.