0

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...???

user1871770
  • 53
  • 1
  • 7

2 Answers2

1

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...

Yahia
  • 69,653
  • 9
  • 115
  • 144
0

Because WebRequest does not run Javascript code inserted into website. You would have to evaluate javascript by yourself. Duplicate: C# httpwebrequest and javascript

Community
  • 1
  • 1
Mateusz
  • 2,287
  • 20
  • 28