Forum Discussion
AlexanderM
14 years agoStaff
Hi Mahendra,
Here are the auto-updated parameters for common ASP.NET variables:
Name: __VIEWSTATE
Regular Expression: \sname\s*?\=\s*?"__VIEWSTATE"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>
Replacing Mask: $1
Name: __EVENTVALIDATION
Regular Expression: \sname\s*?\=\s*?"__EVENTVALIDATION"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>
Replacing Mask: $1
Here, the Name field refers to an URL or body variable name (that is, a parameter of a GET or POST request). The regular expression is applied to the body of responses sent by your web server (that is, to the HTML markup returned by the server in general case). Since the __VIEWSTATE value is written in a hidden input tag, the particular regular expression retrieves a tag whose "name" attribute equal to "__VIEWSTATE" and gets the value of the "value" attribute from the same tag - that is, retrieves the viewstate value. The Replacing Mask field specifies the new value of the __VIEWSTATE URL or Body parameter which should be inserted instead of the recorded value. The value can be either a hard-coded string or (which is a more common case) a string retrieved from an actual server response via a regular expression (as in the sample above). The "$1" string means that the recorded value should be replaced with the value retrieved from the first regular expression match group (note the parentheses in the regular expression above - the value in parentheses is the value which will be retrieved from the actual HTML and inserted in HTTP requests).
Related Content
- 4 years agoThomas83
- 3 years agoLucian
- 5 years agoLachulearns