Request.UrlReferrer null?

前端 未结 4 568
时光说笑
时光说笑 2020-11-27 06:53

In an aspx C#.NET page (I am running framework v3.5), I need to know where the user came from since they cannot view pages without logging in. If I have page A

4条回答
  •  独厮守ぢ
    2020-11-27 07:06

    What you're looking for is best done with a query string variable (e.g. returnURL or originURL). Referrer is best used for data mining operations as it's very unreliable.

    See the way ASP.Net does redirection with logins for an example.

提交回复
热议问题