I have two websites.. (MVC applications)
http://www.WebsiteA.com (has two tabs in it) like this.. in its “.master” page.
<ul id="module" class="module">
<li id="home"><%=Html.ActionLink("Home", "ActionHome", "Home")%></li>
<li id="Pay"><%=Html.ActionLink("Payment", "ActionPay", "Payment")%></li>
</ul>
If some one goes to the website directly at http://www.websiteA.com, this is what they should see, two tabs, Home and Payment.
There is another website lets say http://www.WebsiteB.com that has this iframe in one of its pages. The Iframe basically points to first website A.
This is website B http://www.websiteB.com/linktoWebsiteA
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<iframe src="http://www.websiteA.com"</iframe>
</asp:Content>
My question is : How can I make the website A show two tabs when some one goes directly to the url (www.websiteA.com) and how can I show “only one tab” (Home tab) when they access the website via the Iframe in websiteB. The website A inside Iframe should show only Home tab. Thanks for your ideas / help.
You could pass a query string parameter when calling from the iframe:
and then use the
iframequery string parameter to show the tabs you want:Another possibility is to use javascript as this is the only way to know whether the site runs inside an iframe if you don’t want to pass some additional indication (such as a query string parameter).