I have a service method that returns a short link for a survey
for example http://iu.eg/Cx3f7
clicking this short link, calls an action method which returns a view
and the short URL changes to the actual one
for example http://Surveys.com/Survey/12
in the browser address bar
is there away to prevent the URL changing and keep using the short one?
Asked
Active
Viewed 378 times
0

Nagwa Ibrahim
- 21
- 1
-
Try explaining your question more so that people could understand it and help you a lot better. ( I did not give the -1) – Narendran Pandian Jul 31 '17 at 10:15
-
Done :) thanks for help – Nagwa Ibrahim Jul 31 '17 at 10:34
-
Show your approach to the problem. :D – Bhuban Shrestha Jul 31 '17 at 10:35
-
@NagwaIbrahim added a link... try it out... It should address your problem – Narendran Pandian Jul 31 '17 at 11:31
-
Thanks a lot, I'd like to add a note, the short link is sent to customers by mail they won't be on any page on my application so I've to open a page to respond to this request. I searched about how the short link is working and I found that it is by default redirecting to the actual URL https://stackoverflow.com/questions/1562367/how-do-short-urls-services-work I also thought to change the URl after the page is loading but the problem was that the short URL is from another domain – Nagwa Ibrahim Aug 01 '17 at 12:42
1 Answers
0
You can try opening the survey inside an iframe html element. It opens up another webpage inside your current webpage.... Thats the only you will go about not changing the url in the browser. You cant change the URL directly (without redirecting to another page), therefore this is a workaround for your desired result.
Try this : How can I load a webpage into an iframe, using ASP.NET MVC?

Narendran Pandian
- 178
- 11