Reputation: 51
I am trying to get the Response string by using C#'s WebRequest and WebResponse classes.
It pulls the string but some part such as forms are missing from response.But when I open the same URL in browser(manually) and inspect elements using firebug it shows every thing.
What may be the problem that I am not getting complete response from WebResponse...???
Upvotes: 0
Views: 762
Reputation: 70369
There are several reasons possible (Javascript, IFRAMEs etc.), for example:
IF the site is using AJAX/JavaScript to build those forms dynamically on the client THEN what you see is correct... Background: since WebRequest does not execute Javascript the result "HttpWebRequest" versus Browser is different...
Upvotes: 1
Reputation: 2317
Because WebRequest does not run Javascript code inserted into website. You would have to evaluate javascript by yourself. Duplicate: C# httpwebrequest and javascript
Upvotes: 0