Spoofing IsPostBack

230 Views Asked by At

I'm using HtmlAgilityPack as part of an automated process to extract content from existing internal web pages. The problem is that I need to be able to make it think IsPostBack is true.

This is the flow:

  • Make initial call to page and extract HTML.

  • Parse HTML to extract __EVENTVALIDATION, __VIEWSTATE, __EVENTTARGET etc... and append them to my next POST back to the same page.

  • Append specific criteria to POST to simulate user input (date range selection for instance).

  • POST back to same page and retrieve HTML from response.

It works in testing, two of the criteria are set based on my submission. But two more are overridden inside an IsPostBack check. So far I have not been able to get it to see IsPostBack as being true on the second request.

Does anyone know specifically what ASP.NET looks at to set IsPostBack?

1

There are 1 best solutions below

0
On

for spoofing you need to simple page like that which you want spoof that page

for simple page you want than you need to download this software for copy offline browser for this software you will get HTML,CSS,JS.

than you can use it

http://www.httrack.com/