iframe,frame problems!

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 6, 2004.

  1. Can i use Frameset in ASP.NET?What are other options
    I have a question :-
    I have an asp.net page and i'm using TreeView control as links
    The links are on the left side of the page inside a iframe! I used iframe
    b-cos the links are too long and they shift the page to the right.
    Is there a way that if a user clicks a link on the Treeview it can target to
    the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    What other ways are available to divide pages in ASP.NET like in FRAMESET?
    Thanks!
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 6, 2004
    #1
    1. Advertising

  2. 2 suggestions:

    1) discard the iframe for the treeview and instead use a <div>. To prevent
    "shift to the right", simply apply the overflow-x:hidden style. If you want
    a vertical scrollbar, add the appropriate overflow-y value.

    2) "Is there a way that if a user clicks a link on the Treeview it can
    target to
    the table of the main window on the right" -- this is where you should use
    an iframe. Position it how you like and ensure that it has a "name"
    attribute (ie. name="myiframe"). Your links in your treeview should target
    this name (ie. target="myiframe").

    "Patrick.O.Ige" wrote:

    > Can i use Frameset in ASP.NET?What are other options
    > I have a question :-
    > I have an asp.net page and i'm using TreeView control as links
    > The links are on the left side of the page inside a iframe! I used iframe
    > b-cos the links are too long and they shift the page to the right.
    > Is there a way that if a user clicks a link on the Treeview it can target to
    > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > Thanks!
    =?Utf-8?B?TWF0dGhldyBMZWE=?=, Oct 6, 2004
    #2
    1. Advertising

  3. 2 suggestions:

    1) discard the iframe for the treeview and instead use a <div>. To prevent
    "shift to the right", simply apply the overflow-x:hidden style. If you want
    a vertical scrollbar, add the appropriate overflow-y value.

    2) "Is there a way that if a user clicks a link on the Treeview it can
    target to
    the table of the main window on the right" -- this is where you should use
    an iframe. Position it how you like and ensure that it has a "name"
    attribute (ie. name="myiframe"). Your links in your treeview should target
    this name (ie. target="myiframe").

    "Patrick.O.Ige" wrote:

    > Can i use Frameset in ASP.NET?What are other options
    > I have a question :-
    > I have an asp.net page and i'm using TreeView control as links
    > The links are on the left side of the page inside a iframe! I used iframe
    > b-cos the links are too long and they shift the page to the right.
    > Is there a way that if a user clicks a link on the Treeview it can target to
    > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > Thanks!
    =?Utf-8?B?TWF0dGhldyBMZWE=?=, Oct 6, 2004
    #3
  4. 2 suggestions:

    1) discard the iframe for the treeview and instead use a <div>. To prevent
    "shift to the right", simply apply the overflow-x:hidden style. If you want
    a vertical scrollbar, add the appropriate overflow-y value.

    2) "Is there a way that if a user clicks a link on the Treeview it can
    target to
    the table of the main window on the right" -- this is where you should use
    an iframe. Position it how you like and ensure that it has a "name"
    attribute (ie. name="myiframe"). Your links in your treeview should target
    this name (ie. target="myiframe").

    "Patrick.O.Ige" wrote:

    > Can i use Frameset in ASP.NET?What are other options
    > I have a question :-
    > I have an asp.net page and i'm using TreeView control as links
    > The links are on the left side of the page inside a iframe! I used iframe
    > b-cos the links are too long and they shift the page to the right.
    > Is there a way that if a user clicks a link on the Treeview it can target to
    > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > Thanks!
    =?Utf-8?B?TWF0dGhldyBMZWE=?=, Oct 6, 2004
    #4
  5. 2 suggestions:

    1) discard the iframe for the treeview and instead use a div. To prevent
    "shift to the right", simply apply the overflow-x:hidden style. If you want
    a vertical scrollbar, add the appropriate overflow-y value.

    2) "Is there a way that if a user clicks a link on the Treeview it can
    target to
    the table of the main window on the right" -- this is where you should use
    an iframe. Position it how you like and ensure that it has a "name"
    attribute (ie. name="myiframe"). Your links in your treeview should target
    this name (ie. target="myiframe").

    "Patrick.O.Ige" wrote:

    > Can i use Frameset in ASP.NET?What are other options
    > I have a question :-
    > I have an asp.net page and i'm using TreeView control as links
    > The links are on the left side of the page inside a iframe! I used iframe
    > b-cos the links are too long and they shift the page to the right.
    > Is there a way that if a user clicks a link on the Treeview it can target to
    > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > Thanks!
    =?Utf-8?B?TWF0dGhldyBMZWE=?=, Oct 6, 2004
    #5
  6. Thx for these ideas..
    So that means my main window would be the IFRAME WINDOW.
    And 'm trying to avoid that but i would give it a try!!
    Do u have an example of the DIV with the style?



    "Matthew Lea" wrote:

    > 2 suggestions:
    >
    > 1) discard the iframe for the treeview and instead use a <div>. To prevent
    > "shift to the right", simply apply the overflow-x:hidden style. If you want
    > a vertical scrollbar, add the appropriate overflow-y value.
    >
    > 2) "Is there a way that if a user clicks a link on the Treeview it can
    > target to
    > the table of the main window on the right" -- this is where you should use
    > an iframe. Position it how you like and ensure that it has a "name"
    > attribute (ie. name="myiframe"). Your links in your treeview should target
    > this name (ie. target="myiframe").
    >
    > "Patrick.O.Ige" wrote:
    >
    > > Can i use Frameset in ASP.NET?What are other options
    > > I have a question :-
    > > I have an asp.net page and i'm using TreeView control as links
    > > The links are on the left side of the page inside a iframe! I used iframe
    > > b-cos the links are too long and they shift the page to the right.
    > > Is there a way that if a user clicks a link on the Treeview it can target to
    > > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > > Thanks!
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=, Oct 6, 2004
    #6
  7. BTW. . .sorry for the repeat posts. . .MSDN kept replying that they had failed.

    Of course, I don't know exactly what you're up to. I assumed that you
    wanted the tree to remain visible at all times as it sounds like a navigation
    system. Unless the contents of the tree are highly dynamic, you probably
    don't want the tree being rebuilt every time the user clicks a link. Hence,
    use an iframe for the actual content. An alternative would be to add the
    tree to each and every content page (yuck) or to use a frameset with the tree
    on the left frame and the content on the right frame. The latter approach
    uses the same technique as the iframe. . .namely, "name" your frame and set
    your target of the links to the name. I personally like the iframe approach.
    .. .(example below)

    <body>
    <table cellpadding="0" cellspacing="0" style="width:100%; height:100%;
    table-layout:fixed;">

    <colgroup>
    <col width="200px"/> <!-- set width of treeview -->
    <col/>
    </colgroup>

    <tbody>
    <tr>
    <td>
    <div style="position:relative; width:100%; height:100%;
    overflow-x:hidden; overflow-y:auto;">
    <!-- ... TREEVIEW GOES HERE ... -->
    </div>
    </td>

    <td>
    <div style="position:relative; width:100%; height:100%;
    overflow-x:hidden; overflow-y:auto;">
    <iframe frameborder="no" style="position:relative; width:100%;
    height:100%;"></iframe>
    </div>

    </td>
    </tr>
    </tbody>
    </table>
    </body>



    "Patrick.O.Ige" wrote:

    > Thx for these ideas..
    > So that means my main window would be the IFRAME WINDOW.
    > And 'm trying to avoid that but i would give it a try!!
    > Do u have an example of the DIV with the style?
    >
    >
    >
    > "Matthew Lea" wrote:
    >
    > > 2 suggestions:
    > >
    > > 1) discard the iframe for the treeview and instead use a <div>. To prevent
    > > "shift to the right", simply apply the overflow-x:hidden style. If you want
    > > a vertical scrollbar, add the appropriate overflow-y value.
    > >
    > > 2) "Is there a way that if a user clicks a link on the Treeview it can
    > > target to
    > > the table of the main window on the right" -- this is where you should use
    > > an iframe. Position it how you like and ensure that it has a "name"
    > > attribute (ie. name="myiframe"). Your links in your treeview should target
    > > this name (ie. target="myiframe").
    > >
    > > "Patrick.O.Ige" wrote:
    > >
    > > > Can i use Frameset in ASP.NET?What are other options
    > > > I have a question :-
    > > > I have an asp.net page and i'm using TreeView control as links
    > > > The links are on the left side of the page inside a iframe! I used iframe
    > > > b-cos the links are too long and they shift the page to the right.
    > > > Is there a way that if a user clicks a link on the Treeview it can target to
    > > > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > > > What other ways are available to divide pages in ASP.NET like in FRAMESET?
    > > > Thanks!
    =?Utf-8?B?TWF0dGhldyBMZWE=?=, Oct 6, 2004
    #7
  8. Thx a lot Mathew.
    Iframe is ok but i want to avoid FRAMESET :(
    Will try out the code anyway!



    "Matthew Lea" <> wrote in message
    news:...
    > BTW. . .sorry for the repeat posts. . .MSDN kept replying that they had

    failed.
    >
    > Of course, I don't know exactly what you're up to. I assumed that you
    > wanted the tree to remain visible at all times as it sounds like a

    navigation
    > system. Unless the contents of the tree are highly dynamic, you probably
    > don't want the tree being rebuilt every time the user clicks a link.

    Hence,
    > use an iframe for the actual content. An alternative would be to add the
    > tree to each and every content page (yuck) or to use a frameset with the

    tree
    > on the left frame and the content on the right frame. The latter approach
    > uses the same technique as the iframe. . .namely, "name" your frame and

    set
    > your target of the links to the name. I personally like the iframe

    approach.
    > . .(example below)
    >
    > <body>
    > <table cellpadding="0" cellspacing="0" style="width:100%; height:100%;
    > table-layout:fixed;">
    >
    > <colgroup>
    > <col width="200px"/> <!-- set width of treeview -->
    > <col/>
    > </colgroup>
    >
    > <tbody>
    > <tr>
    > <td>
    > <div style="position:relative; width:100%; height:100%;
    > overflow-x:hidden; overflow-y:auto;">
    > <!-- ... TREEVIEW GOES HERE ... -->
    > </div>
    > </td>
    >
    > <td>
    > <div style="position:relative; width:100%; height:100%;
    > overflow-x:hidden; overflow-y:auto;">
    > <iframe frameborder="no" style="position:relative; width:100%;
    > height:100%;"></iframe>
    > </div>
    >
    > </td>
    > </tr>
    > </tbody>
    > </table>
    > </body>
    >
    >
    >
    > "Patrick.O.Ige" wrote:
    >
    > > Thx for these ideas..
    > > So that means my main window would be the IFRAME WINDOW.
    > > And 'm trying to avoid that but i would give it a try!!
    > > Do u have an example of the DIV with the style?
    > >
    > >
    > >
    > > "Matthew Lea" wrote:
    > >
    > > > 2 suggestions:
    > > >
    > > > 1) discard the iframe for the treeview and instead use a <div>. To

    prevent
    > > > "shift to the right", simply apply the overflow-x:hidden style. If

    you want
    > > > a vertical scrollbar, add the appropriate overflow-y value.
    > > >
    > > > 2) "Is there a way that if a user clicks a link on the Treeview it can
    > > > target to
    > > > the table of the main window on the right" -- this is where you should

    use
    > > > an iframe. Position it how you like and ensure that it has a "name"
    > > > attribute (ie. name="myiframe"). Your links in your treeview should

    target
    > > > this name (ie. target="myiframe").
    > > >
    > > > "Patrick.O.Ige" wrote:
    > > >
    > > > > Can i use Frameset in ASP.NET?What are other options
    > > > > I have a question :-
    > > > > I have an asp.net page and i'm using TreeView control as links
    > > > > The links are on the left side of the page inside a iframe! I used

    iframe
    > > > > b-cos the links are too long and they shift the page to the right.
    > > > > Is there a way that if a user clicks a link on the Treeview it can

    target to
    > > > > the table of the main window on the right (I DOUBT IF ITS POSSIBLE)
    > > > > What other ways are available to divide pages in ASP.NET like in

    FRAMESET?
    > > > > Thanks!
    Patrick.O.Ige, Oct 9, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    478
  2. Daedalous
    Replies:
    3
    Views:
    651
    Daedalous
    Jan 16, 2004
  3. James Wallace
    Replies:
    1
    Views:
    90
    William Morris
    May 14, 2004
  4. Replies:
    2
    Views:
    172
  5. Replies:
    0
    Views:
    108
Loading...

Share This Page