Options

Retrieve Hidden Field

lvaletlvalet Posts: 2
edited April 1, 2005 12:22PM in ANTS Load
Hello

I would like to know if it's feasible to read a Hidden Filed in the page an post this value to the next page?

Example
After the first call of my page, there is something like this:
...
<input type="hidden" name="__PAGEREQUESTID" value="050401T13:47:22:5661" />
...

And i vould like to retrieve this value to do something like this:
...
WebClient.HttpRequest.AddPostData("__PAGEREQUESTID", MyPageRequestIDValue, False)
...

I think it's really easy to do that but i was not able to find a solution
Could you help me?
Regard

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    It's possible to parse the content of the page received as the result of a request. If you get the page, you can assign WebClient.HttpResponse.Content to a string and then use the Substring() method on the string to find the data that you need.

    If the hidden field was inside a form tag, then the ANTS script recorder would normally pick it up and put it in the script for you. But I suppose that if you have dynamic information in this tag that will change depending on the time, then you may not have a choice but to parse the information out of the content.
This discussion has been closed.