0

I create and safe a Browser Windows GUID in the sessionstorage on client side via javascript. So it stays alive until the tab is closed.

Now I want to pass this information on every request from this specific browser window to the server side so I can access it on any time without passing it with the model.

I use ASP.NET MVC. So there is no ViewState available if I'm right.

I thought about adding and accessing a custom field in the HTTP Header or something similar. I try to find something to accomblish that. So I need some ideas.

Thank you

(Sorry. English is not my first language)

Palmi
  • 2,381
  • 5
  • 28
  • 65

1 Answers1

0

Once you set the Cookies, it shall be pass with every HTTP request to the server. And in the Controller you can access Cookie via

HttpCookie cookie = HttpContext.Request.Cookies.Get("cookie_name");
Arun Ghosh
  • 7,634
  • 1
  • 26
  • 38