Click here to Skip to main content
15,608,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
For reasons owing to the availability of software, I'm stuck working in Visual Studio 2010 (.NET 4.0). I'm developing a site using WebForms, and the prototype utilizes Master Pages, including the standard tabbed menus provided by the default Master Page. (May well abandon MP setup, but for now I'm trying to keep moving forward.)

The problem is that on pages with an iframe, the tabbed menu loses its formatting. Instead of properly displaying in a horizontal layout, the menu items display vertically. Not only is this an unwanted, unattractive artifact, but it pushes the iframe well down the page, making immediate testing of it rather difficult.

It seems to me that I've encountered this issue in the past on a previous project and solved it by enclosing the iframe tags within ASP literals (see first example from previous project). But it's not working here (see second example from current project). A comparison of pages from the working and non-working projects yields nothing of obvious value, except that in the "good" project, the Master Page is nested (the page in question resides in an Admin folder within the main project).

Any suggestions as to what to look for? Thanks in advance.

What I have tried:

<asp:Literal ID="divSearchResults" runat="server"><iframe src="Frames/ContactSearchResultsFrame.aspx" scrolling="auto" frameborder="0" height="200" width="100%"></iframe></asp:Literal>

<asp:Literal ID="divHandgunsFrame" runat="server"><iframe src="IFrames/Handguns.aspx" scrolling="auto" width="100%" /></asp:Literal>
F-ES Sitecore 19-Jul-18 5:19am    
It'll be something css related. Use the browser dev tools to look at the classes and styles attached to things to work out why their not working. It'll either be styling or something to do with the iframe's width or height possible. It's hard to say.
byff 19-Jul-18 12:30pm    
Very interesting. The "role=menuitem", class="static" and style attributes are not being produced in the LI elements, and the UL element is missing the role, class, tabindex and style attributes.

Thanks for the suggestion. Maybe I can work around this in CSS, but I'm also considering using a different construct (the ASP Placeholder control).
byff 19-Jul-18 20:37pm    
The Placeholder didn't work either, but I know I can fix the issue by simply creating the menu explicitly rather than through the ASP menu control. I'm gonna consider this solved. Thanks again!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900