Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Additional Note: (EmmanuelGuyot) What about the cases where VIEWSTATE is split into different part ? The field VIEWSTATEFIELDCOUNT is easy, but as _''_VIEWSTATExx fields number varies, is it possible to set a dynamic NAME in the Request ?

Additional Note: (SChauhanSonamChauhan) 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 used a simpler regular expression than the one in the article: <br/>
id="__PREVIOUSPAGE"\s*value="(.*?)"<br/>
(I'm reluctant to replace the one in the main article, unless I know the reason for it). Note the '?' used to specify non-greedy regular-expression matching.

For pages that had 'jammed-in' pipe-delimited data, I use this type of regular expression instead: <br/>
|__PREVIOUSPAGE|(.*?)|<br/>