Reputation: 75869
I've got the following piece of code in an aspx webpage:
Response.Redirect("/Someurl/");
I also want to send a different referrer with the redirect something like:
Response.Redirect("/Someurl/", "/previousurl/?message=hello");
Is this possible in Asp.net or is the referrer handled solely by the browser?
Cheers Stephen
Upvotes: 1
Views: 2144
Reputation: 1564
Response.Redirect
sends an answer code (HTTP 302) to the browser which in turn issues a new request (at least this is the expected behavior). Another possibility is to use Server.Transfer
(see here) which doesn't go back to the browser.
Anyway, both of them don't solve your request. Perhaps giving some more detail on your case can help find another solution. ;-)
Upvotes: 1
Reputation: 19591
Referrer is readonly and meant to be that way. I do not know why you need that but you can send query variables as instead of
Response.Redirect("/Someurl/");
you can call
Response.Redirect("/Someurl/?message=hello");
and get what you need there, if that helps.
Upvotes: 4
Reputation: 38130
The referrer comes solely from the client browser (which may be lying to you, too)
Upvotes: 0