For a project I have created an Provider Hosted App (MVC) that displays product data. As we want to include this data on a public facing website I included it in an App Part (iframe). To make all the pages inside the iframe seperately indexed by Google I want to have unique parent page URL for every MVC page.
The MVC site has three controllers and a bunch of actions. By specifying
target="_parent" I'm able to refresh the parent URL when clicking on a link on the MVC site:
<a href="http://app.dev/Pages/Test.aspx?MvcUrl=/Products/MyProducts" target="_parent">MyProduct product</a>
The problem is that I can't read the
MvcUrl=/Products/MyProduct querystring in the app so I can route to the correct action in the MVC page. So my question is how to pass the routing from the parent site to the App part. I thought this should be a very trivial task, but I haven't been able to figure it out yet.
Example of what I try to achieve