c# - UrlReferrer - need to find out where it's coming from -
i need find out page request coming from. instance have button in page , when clicked redirects follows
http://...../clientname/names.aspx?nameid=4,
page a's
url = "http://...../maintenance/names.aspx?nameid=4"
in page b, want able determine if it's coming page a. notice page , page b have same ending in different folders... how can know in page b if it's coming names.aspx in folder maintenance?
thank you
one hint: url referrer sent browser (request header). not reliable, since (for instance) security tools might remove request, proxies. have used same concept years back, later failed because of reason.
example: http://darklaunch.com/2011/05/07/chrome-disable-referer-headers
on other hand, if can rely on referrer - e.g. because in intranet, go ahead - ft / kuru said use httpcontext.current.request.urlreferrer
. easy use.
we have later solved on application level:
- give different html forms different logical names
- you can use hidden form fields have information in form
Comments
Post a Comment