Reputation: 3230
I think the title isn't clear enough because I didn't know how to ask it.
What I'm doing is requesting general handler using ajax and I want to know the current url of the page, I think I can use javascript method to get the current url and send it with the request as parameter, but the problem is that the user can change the url before clicking the button and sending the request so I'll never knew if this is the real url.
Any idea how can I do it ?
Many thanks
Upvotes: 0
Views: 157
Reputation: 6654
I think that the safest way is to get it from the server-side. You can use this.Request.UrlReferrer to get this information.
Upvotes: 1