title: Pass URL to new View as a parameter
body: <p>I've spent a couple of hours trying to work out a way to do this. It's such a simple requirement that I can't believe I need to create view models or anything so grandiose.</p>
  
  <p>Very simply, using MVC5, I have a View, let's call it Page1, on which there is a hyperlink. When the user clicks that hyperlink, I want them to be taken to a new View, Page2. On Page2 is an <code>iframe</code>. I want to set the <code>src</code> attribute of that <code>iframe</code> to the URL of Page1, the View that the user was redirected from.</p>
  
  <p>So, if I could maybe use the ViewBag (which people on here don't seem to recommend), to pass the URL of Page1 from that View to the Controller for Page2, and then use Razor in my markup on Page2 to define the <code>src</code> attribute of the <code>iframe</code>, I imagine that'd work fine. Unfortunately, people don't seem to like using ViewBag, and also, I can't find an end-to-end description of how to actually achieve this in code.</p>
  
  <p>Can somebody give me an appropriately straightforward solution to this problem?</p>