Is it possible to set parameters in the header of an HttpResponse
, then redirect?
I tried something like this:
Response.Headers.Add("test", "1234");
Response.Redirect(www.targetpage.com);
and then
var result = Request.Headers["test"];
My problem is that I don't find the parameter in my request result
is always null and I cannot pass the the parameters in the url I need a solution with the header, thanks.
You are redirecting the client, so anything you sent to the client in the Response is probably flushed/discarded. If your intent is to control the redirect then you'd need to handle that in js on the client.
There are many ways to implement your own messaging: