Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: final comment for ASP.NET 2.0

...

Additional Note: (SChauhan) Concurring with FrankZimper - while testing an ASP.NET 2.0 site, the fields it used had two leading underscores. I used regexs to extract and pass three fields between ASP.NET pages: +PREVIOUSPAGE, +VIEWSTATE, __EVENTVALIDATION. These fields existed on all the ASP.NET pages, either cleanly stored in hidden HTML form fields, or in a couple of instances, strangely jammed in as invisible parts of the DOM using a weird, pipe-delimited syntax.

For extracting out hidden form fields, I had to add an additional leading underscore to the id fields in the regexes. I used a simpler regular expression than the one above: id="__PREVIOUSPAGE"\s*value="(.*?)". Note the two underscores, and (I'm reluctant to replace it though unless I know the reason for it). Note the '?' used to denote specify non-greedy regular-expression matching.

Also, some pages did not use a 'proper' hidden field and seemed to 'jamFor pages that had 'jammed-in' data into a pipe-delimited string. For these pagesdata, I had to use this type of regular expression instead: |__PREVIOUSPAGE|(.*?)|Lastly, I used two sets of regexs (hidden parameter and pipe-delimited) for 3 variables: +PREVIOUSPAGE, +VIEWSTATE, and __EVENTVALIDATION fields.