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:

  1. give different html forms different logical names
  2. you can use hidden form fields have information in form

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -