CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2007
    Posts
    4

    Two pages in one page without using the frames

    Hi All
    Is there a way to display two pages in one page without using the frames??

    Thanks

  2. #2
    Join Date
    Feb 2007
    Location
    Cat Square (near Charlotte)
    Posts
    16

    Re: Two pages in one page without using the frames

    The concept of "master pages" and "content pages" do that. You define a master page that has some controls on it, usually things like headers, footers, menus. You also define WHERE the content will be located in a contentplaceholder control.

    On a separate page, you define that child page as having a master page parent. All of the content you place on this page will go into the contentplaceholder control of the masterpage.

    At least, in asp.net, this is one way of doing it.


    An older way of doing it, is using server side includes, where you "include" a file into another file. The files are called .shtml. This is the way the menu is incorporated into my web site currently (rons-web.com). I have the menu in one file, then that gets included into the other files. All I have to do is change the menu file, and all other files are automatically updated.

    NOTE: I am currently learning ASP.NET 2.0 and plan on updating my design soon.
    C# - Visual Studio 2005
    Frameworks 2.0

  3. #3
    Join Date
    Dec 2007
    Posts
    4

    Re: Two pages in one page without using the frames

    Thanks!
    Yes it might be something like your webpage

    For example, the initial page (the one with the trees and mustards) is always being displayed when you open www.rons-web.com, as well as the Menu Page.

    Where in the code are located both webpages' paths??

    By the way, I think my server is not properly configured to support SSIs :S

  4. #4
    Join Date
    Dec 2007
    Posts
    4

    Re: Two pages in one page without using the frames

    You know what...iFRAMES made the job !

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: Two pages in one page without using the frames

    An iframe is no different from regular frames except that it is inline. Why don't you use AJAX if you don't want the menus and parts of your site to change?
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  6. #6
    Join Date
    Dec 2007
    Posts
    4

    Re: Two pages in one page without using the frames

    Thanks
    I dont need a menu, it is that I open a page as IFRAME and have a button in the main page. When I click this button the whole page (both IFRAMEd and main one) closes, and that's it.

  7. #7
    Join Date
    May 2002
    Posts
    10,943

    Re: Two pages in one page without using the frames

    Well, the menu was just an example because I saw that it was mentioned earlier. Anyway, since you problem is solved, why don't you mark the thread resolved? You can do so by the Thread Tools menu.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured