...
Additional Note: (SChauhan) Concurring with FrankZimper - while testing an ASP.NET 2.0 site I had to add an additional leading underscore to the id fields in the regexes. I used a simpler regular expression. Note the two underscores, and the '?' to denote non-greedy matching
<tt> : id="__PREVIOUSPAGE"\s*value="(.*?)"
</tt> . Note the two underscores, and the '?' to denote non-greedy regular-expression matching.
Also, some pages did not use a 'proper' hidden field and seemed to 'jam-in' data into a pipe-delimited string. For these pages, I had to use this regular expression instead:
<tt> |__PREVIOUSPAGE|(.*?)|
</tt>
Lastly, I used a these regexs for the PREVIOUSPAGE, two sets of regexs (hidden parameter and pipe-delimited) for 3 variables: +PREVIOUSPAGE, +VIEWSTATE, and __EVENTVALIDATION fields (all prefixed with two underscores).