Last post Sep 16, 2020 09:38 PM by dlchase
Member
361 Points
1581 Posts
Sep 16, 2020 08:56 PM|dlchase|LINK
How do I get the page name and/or url of the calling page in my internal web application? For example if my page is AuditTrail.aspx and the page that called it is OrgInfo.aspx I want to be able to know the page I came from. Thanks.
All-Star
53661 Points
24019 Posts
Sep 16, 2020 09:34 PM|mgebhard|LINK
The browser sets the referer header with the URL that made the request. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer
Uri referrer = Request.UrlReferrer
Keep in mind, here is no guarantee the header is set. Web crawlers or automated requests may not set the referrer header.
Sep 16, 2020 09:38 PM|dlchase|LINK
Cool. I can pull the page name from that string then. Thanks.
Member
361 Points
1581 Posts
Source page
Sep 16, 2020 08:56 PM|dlchase|LINK
How do I get the page name and/or url of the calling page in my internal web application? For example if my page is AuditTrail.aspx and the page that called it is OrgInfo.aspx I want to be able to know the page I came from. Thanks.
All-Star
53661 Points
24019 Posts
Re: Source page
Sep 16, 2020 09:34 PM|mgebhard|LINK
The browser sets the referer header with the URL that made the request. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer
Uri referrer = Request.UrlReferrer
Keep in mind, here is no guarantee the header is set. Web crawlers or automated requests may not set the referrer header.
Member
361 Points
1581 Posts
Re: Source page
Sep 16, 2020 09:38 PM|dlchase|LINK
Cool. I can pull the page name from that string then. Thanks.