How to open Child Pages in Parent Page

Discussion in 'C#' started by srinuanil, Nov 20, 2008.

  1. #1
    Hi,

    I've been stuck on this for the last few days and was wondering if you could help me. I'm not even sure if using javascript is the best option to do this, but if you could help me anyway that would be great. My dilemma is I'm designing a website which has several links in the left hand navigation bar. But at the moment, the links open in a new window. I don't want that. I want them to open in the main area of the parent window. Normally if i'd used frames, opening the links within that same page wouldn't have been a problem because I could just use the target attribute.

    But I didn't use frames, I used CSS layouts but when I set the target attribute to _parent, the links open up across the whole page rather than just in the main section.Can some one provide some code to point me in the right direction of how to do this?
     
    srinuanil, Nov 20, 2008 IP
  2. web-bod

    web-bod Guest

    Messages:
    17
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Don't think it can be done. You either need to reload the whole page or use frames.
     
    web-bod, Nov 22, 2008 IP
  3. Link.ezer.com

    Link.ezer.com Peon

    Messages:
    647
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you may try to use server.Execute("file") instead
     
    Link.ezer.com, Nov 23, 2008 IP
  4. Link.ezer.com

    Link.ezer.com Peon

    Messages:
    647
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you may try to use server.Execute("file") instead
     
    Link.ezer.com, Nov 23, 2008 IP
  5. camjohnson95

    camjohnson95 Active Member

    Messages:
    737
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #5
    You could use an inline frame or <IFRAME>
     
    camjohnson95, Nov 24, 2008 IP
  6. sukkepan

    sukkepan Guest

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Is this ASP.NET? Why not use Master page or user controls?
     
    sukkepan, Nov 30, 2008 IP