Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8379097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:05:19+00:00 2026-06-09T16:05:19+00:00

I have two websites.. (MVC applications) www.WebsiteA.com (has two tabs in it) like this..

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:05:21+00:00Added an answer on June 9, 2026 at 4:05 pm

    You could pass a query string parameter when calling from the iframe:

    <iframe src="http://www.websiteA.com/?iframe=true"</iframe>
    

    and then use the iframe query string parameter to show the tabs you want:

    <ul id="module" class="module">       
        <li id="home"><%=Html.ActionLink("Home", "ActionHome", "Home")%></li>
        <% if (!string.IsNullOrEmpty(Request["iframe"])) { %>    
            <li id="Pay"><%=Html.ActionLink("Payment", "ActionPay", "Payment")%></li>
        <% } %>
    </ul>
    

    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).

    <script type="text/javascript">
        if (top !== self) { 
            // running inside an iframe => hide the tabs you don't want
        }
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two websites: http://example.com http://example.com/sub I have a page, let's say: http://example.com/sub/page1 Is
I have two websites A.com and B.com. I have to embedd B.com in an
I have two IIS websites, namely accounts.example.com that was created in Visual Studio 2010
I have two websites A and B both written in ASP.NET MVC 3. In
We have an MVC application that is accessed from two separate websites. The default
I have an MVC application which is my marketing website, and two other regular
I have two websites on the same machine. The first (client) references a WCF
I have two websites that post news information. I just got a request to
I have two websites that have an almost identical database schema. the only difference
I have two websites on two different servers. When I print the following on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.