Ganesh Rajan

Ganesh Rajan

  • NA
  • 3
  • 714

How to add a custom value to Request Header ?

May 3 2015 3:48 PM
In my asp.net application, i have a aspx page ( demo.aspx ). my requirement is, I need to set a dynamic value to the header of each request made from this demo.aspx page. Basically i want to send a value from one page to another. I must not use query string. & also not to use session. because it is shared across all the pages. 
 
Another way i can explain this problem is, I have 2 pages. PageA.aspx & PageB.aspx.
 
First I will open PageA.aspx, where i have an anchor tag, refers to PageB.aspx. On Clicking that link, i will be redirected to PageB.aspx, & on the page load, I will get the referer ie( PageA.aspx ).  Here i need to get a value which is dynamically generated in PageA.aspx.
 
If there was another page called PageC.aspx, and if the user navigates to PageC.aspx from PageA.aspx, the same should be able to done.
 
Usage:
I want to dynamically build the breadcrumb based on the users navigation. I am using session to keep track of all the navigation. Because of that i am facing some issues when the user open the application in multiple browser tab. Using Server Variable HTTP_REFERER i am able to get the previous page Url, even though it is client side navigation, but to uniquely identify the Referer, i want to send some ID with the Referer. 
 
Any idea ??? 

Answers (1)