Response.Redirect with different referrer

I have the following piece of code in an aspx webpage:

Response.Redirect("/Someurl/");

      

I also want to send another referrer with redirects something like:

Response.Redirect("/Someurl/", "/previousurl/?message=hello");

      

Is this possible in Asp.net or is the referrer handled exclusively by the browser?

Cheers Stephen

+1


source to share


3 answers


Referrer is read-only and should be. I don't know why you need this, but you can send request variables instead

Response.Redirect("/Someurl/");

      

you may call



Response.Redirect("/Someurl/?message=hello");

      

and get what you need if it helps.

+4


source


Response.Redirect

sends a response code (HTTP 302) to the browser, which in turn issues a new request (at least that's the expected behavior). Another possibility is to use Server.Transfer

(see here ) that doesn't return to the browser. In any case, both of them do not resolve your request. Perhaps a more detailed description of your case may help you find another solution .; -)



+1


source


The referrer comes exclusively from the client browser (which can also lie to you)

0


source







All Articles