0

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?

5
  • Try explaining your question more so that people could understand it and help you a lot better. ( I did not give the -1) Commented Jul 31, 2017 at 10:15
  • Done :) thanks for help Commented Jul 31, 2017 at 10:34
  • Show your approach to the problem. :D Commented Jul 31, 2017 at 10:35
  • @NagwaIbrahim added a link... try it out... It should address your problem Commented 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 domain Commented Aug 1, 2017 at 12:42

1 Answer 1

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?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.