user2549140
user2549140

Reputation:

How do i get a value ( a hidden field in that page ) of a Referer page in the current page?

I am using asp.net & the application is hosted in the IIS. My requirement is, I want to get a value of the referer page, in the current page. i cannot use query string to send that value.

Scenario: I have a page, Home.aspx which is having a hyper link, referring to Demo.aspx page. When clicking the link, i will be redirected to the Demo.aspx page. On page load of the Demo.aspx page, i can get the previous page url(with the query string), by using the HTTP_REFERER server variable. But i need to find a value in that referer page. How do i do this?

Upvotes: 1

Views: 200

Answers (1)

samuel
samuel

Reputation: 371

i can think of other options other than sending the value via query string:

  • set the value as the session variable when displaying the first page (i would prefer this one)
  • make the link (on first page) act like form and send the value via POST parameter
  • set the cookie variable (on the first page) and retrieve it when displaying the second (visitor must allow cookies + the domain names must match this way)

Upvotes: 3

Related Questions