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?
-
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– Narendran Pandian2017-07-31 10:15:03 +00:00Commented Jul 31, 2017 at 10:15
-
Done :) thanks for helpNagwa Ibrahim– Nagwa Ibrahim2017-07-31 10:34:08 +00:00Commented Jul 31, 2017 at 10:34
-
Show your approach to the problem. :DBhuban Shrestha– Bhuban Shrestha2017-07-31 10:35:22 +00:00Commented Jul 31, 2017 at 10:35
-
@NagwaIbrahim added a link... try it out... It should address your problemNarendran Pandian– Narendran Pandian2017-07-31 11:31:03 +00:00Commented Jul 31, 2017 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 stackoverflow.com/questions/1562367/… I also thought to change the URl after the page is loading but the problem was that the short URL is from another domainNagwa Ibrahim– Nagwa Ibrahim2017-08-01 12:42:53 +00:00Commented Aug 1, 2017 at 12:42
Add a comment
|
1 Answer
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?