Reputation: 1567
I want to change sender PAGE URL to anything in my website.
For example I have a webpage named "DEFAULT.ASPX" thats got a Form tag action="http://otherpage.aspx". When I submit the form it's sending my values that are in the form to otherpage.aspx. This page is getting them and does its work.
But otherpage.aspx is looking for sender page url and see in there! Its DEFAULT.ASPX (my page thats got form in it ) . I want to change my page url thats got form to "YOUCANTSEEMYREALPAGENAME.ASPX" ..
WHY I NEED THIS... There is a site that I want to link to. I have linked but if my URL is not "yrmypage.aspx" it's not working properly. So I need to hide my real page url and change it to yrmypage.aspx :)
Upvotes: 0
Views: 610
Reputation: 704
if your question is submitting to other site which has alidation that the data is coming from a specific page then you need a page with the same name. But often it will validate full url so you can not fake this.
If you are trying to get around somebody security to submit data then you could load the form from other site in iframe (size 1x1 pixel so not visible) use jquery to fill form and submit.
If i misunderstand can you rewrite question slightly
Thanks
Upvotes: 0
Reputation:
You could place an iframe on the index page and set the src tag to your homepage. Any links clicked then wont change the url in the address bar.
Upvotes: 0
Reputation: 8078
Ibrahim, I'm not entirely familiar with this but I know that if you use Server.Transfer it would keep your URL as "Default.Aspx" I understand you are submitting and not redirecting but if you could somehow redirect instead it would look like this.
Server.Transfer("URL to go to",True)
This would redirect to the URL you need to go to but the URL would remain as Default.aspx.
It's the closest thing I can think of. Hope it helps sorry if it doesn't
Upvotes: 0
Reputation: 422036
The referrer is set by the browser. You cannot change it unless you are making the request from the server, yourself (in which case, you are essentially "the browser").
Upvotes: 1