Strong Coders Community

Where the extreme coders hang out.
Welcome to Strong Coders Community Sign in | Join | Help Messenger
in Search

ASP.NET Menu Control IFrame Rendering

Last post 02-07-2007, 4:20 AM by kampak1111 . 6 replies.
Sort Posts: Previous Next
  •  11-29-2006, 7:55 AM 1292
    • Dean Fiala is not online. Last active: 02-10-2007, 9:30 PM Dean Fiala
    • Top 10 Contributor
    • Joined on 10-17-2006
    • Posts 49
    • Points 620
    • MicrosoftMVP Moderator StrongCoders

    ASP.NET Menu Control IFrame Rendering

    I have a very simple menu using the ASP.NET menu control.  Got it working in a mock up project, no fuss, no muss.

    Added it to my real project, same settings, same css, same XML source file, put it in the same control which is held by an identical master page.

    Ran the project.  Looks like crap.  The dropdown isn't dropping down, it is showing in-line when the control displays.

    Disable all other CSS and scripts on the page -- same problem.

    Finally I pull out ye old DOM Viewer and voila -- in my mock up, the menu is rendering the dropdown in an IFrame, while in the real app, there was no IFrame created and crapitude resulted.

    So, has anyone run across this before?  Any suggestions would be greatly appreciated.

    BTW, there is one difference in the projects.  The real application is an ASP.NET Web Project (the belated VS add-in), while the mock up is in an out of the box Web Site.


     


    Dean Fiala
    Very Practical Software, Inc.
    Filed under: IFrame , Menu
    • Post Points: 20
    • Alert the moderators
  •  11-29-2006, 10:22 AM 1297 in reply to 1292
    • JamesCurran is not online. Last active: Feb 10, 2007, 11:16 PM JamesCurran
    • Top 10 Contributor
      Male
    • Joined on 11-01-2006
    • Bloomfield, NJ, USA
    • Posts 82
    • Points 1,015
    • StrongCoders

    Re: ASP.NET Menu Control IFrame Rendering

    I've never seen that before, so all I can offer is some wild speculation.

    When you mentioned the IFRAME the first thing I thought of was a master page, and since you are using master page, I get a strong feeling about that.  My only guess is that in the mock up, you somehow got the menu into the content portion of the page, while on the real page you have it correctly in the frame portion.


    Truth,
    James
    • Post Points: 20
    • Alert the moderators
  •  11-29-2006, 10:27 AM 1298 in reply to 1297
    • Dean Fiala is not online. Last active: 02-10-2007, 9:30 PM Dean Fiala
    • Top 10 Contributor
    • Joined on 10-17-2006
    • Posts 49
    • Points 620
    • MicrosoftMVP Moderator StrongCoders

    Re: ASP.NET Menu Control IFrame Rendering

    No, the menu is in the "frame" portion in both applications.  But thanks for the thought.

    Dean Fiala
    Very Practical Software, Inc.
    • Post Points: 5
    • Alert the moderators
  •  12-01-2006, 12:43 PM 1325 in reply to 1298
    • Dean Fiala is not online. Last active: 02-10-2007, 9:30 PM Dean Fiala
    • Top 10 Contributor
    • Joined on 10-17-2006
    • Posts 49
    • Points 620
    • MicrosoftMVP Moderator StrongCoders

    Re: ASP.NET Menu Control IFrame Rendering

    OK,

    More info, but no solution yet.

    It's not IFrame issue per see.  In both projects the IFrame is created dynamically, it is not rendered in the page source.

    In the working web site pages, the bookkeeping controls, _EVENT_TARGET, etc. are wrapped in a div and the master control is assigned and ID = ctl100.

    In the problem project, there is no div wrapping the bookkeeping controls and and the master is assigned an ID = _ctl10.

    Have no idea why this, or if it is related to the problem.  Just found it interesting.


    Dean Fiala
    Very Practical Software, Inc.
    • Post Points: 5
    • Alert the moderators
  •  12-01-2006, 12:48 PM 1327 in reply to 1325
    • Dean Fiala is not online. Last active: 02-10-2007, 9:30 PM Dean Fiala
    • Top 10 Contributor
    • Joined on 10-17-2006
    • Posts 49
    • Points 620
    • MicrosoftMVP Moderator StrongCoders

    Re: ASP.NET Menu Control IFrame Rendering

    meant

    Good project master ID = ctl00

    Problem project master ID = _ctl0
    Dean Fiala
    Very Practical Software, Inc.
    • Post Points: 5
    • Alert the moderators
  •  12-01-2006, 12:53 PM 1328 in reply to 1327
    • Dean Fiala is not online. Last active: 02-10-2007, 9:30 PM Dean Fiala
    • Top 10 Contributor
    • Joined on 10-17-2006
    • Posts 49
    • Points 620
    • MicrosoftMVP Moderator StrongCoders

    Re: ASP.NET Menu Control IFrame Rendering

    Uneffin' believable.  Must have been some naming disconnect somewhere in the javascript that menu control renders.  Maybe it doesn't like leading underscores.

    I simply added this line In the master page's page_load event handler...

     Me.ID = "ctl00"

     

    and the friggin' menu works.

    It works. It works.

     


    Dean Fiala
    Very Practical Software, Inc.
    • Post Points: 5
    • Alert the moderators
  •  02-07-2007, 4:20 AM 1753 in reply to 1327
    • kampak1111 is not online. Last active: 02-07-2007, 5:20 AM kampak1111
    • Top 75 Contributor
      Male
    • Joined on 02-07-2007
    • Poland
    • Posts 1
    • Points 0

    Re: ASP.NET Menu Control IFrame Rendering

      web.config 

    < xhtmlConformance mode = " Legacy " />

    http://msdn2.microsoft.com/en-us/library/ms228268.aspx


    Kamil Pakur
    • Post Points: 0
    • Alert the moderators

Powered by Community Server (Commercial Edition), by Telligent Systems