Dynamic Master / Detail pages question

Discussion in 'ASP .Net' started by =?Utf-8?B?c3FsYm95MjAwMA==?=, Jun 20, 2006.

  1. Hi,
    I've just started playing around with master / detail pages and I'm trying
    to simply change the detail page displayed in the contentplaceholder control
    from code behind. I can't seem to find any examples of this. Does anyone know
    how to do this?

    Thanks in advance.
    =?Utf-8?B?c3FsYm95MjAwMA==?=, Jun 20, 2006
    #1
    1. Advertising

  2. sqlboy2000,

    There are probably a large number of ways to this. You can put controls
    inside two or more <div> tags with the id properties set and with
    runat="server". Then, set the visibilities of the <div>s as you desire.

    You can dynamically build contols in the code.

    You can use nested master pages.

    Can you provide more details on what you are trying to achieve?

    Thanks,
    Eagle

    "sqlboy2000" wrote:

    > Hi,
    > I've just started playing around with master / detail pages and I'm trying
    > to simply change the detail page displayed in the contentplaceholder control
    > from code behind. I can't seem to find any examples of this. Does anyone know
    > how to do this?
    >
    > Thanks in advance.
    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==, Jun 20, 2006
    #2
    1. Advertising

  3. Just a simple example of changing the detail page in code behind.
    controls.add() or whatever it is now when using master / detail pages.

    "" wrote:

    > sqlboy2000,
    >
    > There are probably a large number of ways to this. You can put controls
    > inside two or more <div> tags with the id properties set and with
    > runat="server". Then, set the visibilities of the <div>s as you desire.
    >
    > You can dynamically build contols in the code.
    >
    > You can use nested master pages.
    >
    > Can you provide more details on what you are trying to achieve?
    >
    > Thanks,
    > Eagle
    >
    > "sqlboy2000" wrote:
    >
    > > Hi,
    > > I've just started playing around with master / detail pages and I'm trying
    > > to simply change the detail page displayed in the contentplaceholder control
    > > from code behind. I can't seem to find any examples of this. Does anyone know
    > > how to do this?
    > >
    > > Thanks in advance.
    =?Utf-8?B?c3FsYm95MjAwMA==?=, Jun 20, 2006
    #3
  4. Here's a suggestion. It can get tedious, however.

    <asp:Content ID="Content1" runat="Server"
    ContentPlaceHolderID="ContentPlaceHolder1">

    <asp:Table id="tblMain" runat="server">
    <asp:TableRow id="row1" runat="server">
    <asp:TableCell id="cell11" runat="server">
    </asp:TableCell>
    </asp:TableRow>
    </asp:Table>

    </asp:Content>

    At this point you can add rows and cells to tblMain in your code-behind.
    You can also add controls to the cells.

    You can also try this using the <div> tag instead of a table. I have not
    used the <div> personally this way. I have successfully added rows and cells
    to an asp:Table in this way, but I did not do it for all the content.

    I hope this helps.

    Have Fun!!!
    Eagle

    "sqlboy2000" wrote:

    > Just a simple example of changing the detail page in code behind.
    > controls.add() or whatever it is now when using master / detail pages.
    >
    > "" wrote:
    >
    > > sqlboy2000,
    > >
    > > There are probably a large number of ways to this. You can put controls
    > > inside two or more <div> tags with the id properties set and with
    > > runat="server". Then, set the visibilities of the <div>s as you desire.
    > >
    > > You can dynamically build contols in the code.
    > >
    > > You can use nested master pages.
    > >
    > > Can you provide more details on what you are trying to achieve?
    > >
    > > Thanks,
    > > Eagle
    > >
    > > "sqlboy2000" wrote:
    > >
    > > > Hi,
    > > > I've just started playing around with master / detail pages and I'm trying
    > > > to simply change the detail page displayed in the contentplaceholder control
    > > > from code behind. I can't seem to find any examples of this. Does anyone know
    > > > how to do this?
    > > >
    > > > Thanks in advance.
    =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ==, Jun 20, 2006
    #4
    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:
    1
    Views:
    3,189
    PeterKellner
    May 16, 2006
  2. asmj
    Replies:
    0
    Views:
    490
  3. Arun Kumar Menon

    Master Detail detail

    Arun Kumar Menon, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    184
    Arun Kumar Menon
    Aug 6, 2003
  4. Frederik Borg

    ASp.net data binding: Master-detail-detail

    Frederik Borg, Jun 9, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    346
    Frederik Borg
    Jun 9, 2006
  5. Greg
    Replies:
    0
    Views:
    187
Loading...

Share This Page