I'm not sure if this is possible, but I have a requirement, so I had to ask!
I handle errors / exceptions in an event Application_Errorin Global.asax.
This works fine and I can get the URL where the error occurred.
I would like to get the page where this URL was located, clicking in turn gave me this error. You can say 1 level up.
So, for example, I have a page www.example.com/home-loans.aspxthat has a link that opens www.example.com/problem-url.aspx. That I click on this link www.example.com/problem-url.aspxgives an error, and I can correctly catch it with the url www.example.com/problem-url.aspx, but I can’t figure out how to write it www.example.com/home-loans.aspx.
If the link is called from outside the website (say, from a Google search), this value may be like nullor something else is possible.
Please let me know if you need a code for the event Application_Errorin Global.asax.
Please, help!
Thanks in advance!
source
share