I have a bunch of parameters that I need to pass onto a second page via request headers. At first I tried via JS but I found out that that’s impossible (please correct me if I’m wrong here).
So now I’m trying to do it in the code-behind (via C#). I want to write a bunch of custom request headers and call Response.Redirect or something similar to redirect user to the new page.
Is this possible? If so what methods do I have to use?
Edit: unfortunately using QS parameters is not an option here as it’s out of my control.
Use a
Server.Transfer("somepage.aspx?parameter1=value");There is no client redirect then.
You can try setting the headers and do a Server.Transfer – I believe that will work to – up to you, but using the querystring is a bit more readable to me and doesn’t show up in the clients browser.