creating interface dynamicly

Discussion in 'ASP .Net Web Controls' started by Vasko Buraliev, Sep 22, 2003.

  1. Hey folks,

    I'm trying to generate create interface that should be consist static part
    and dynamic part.
    For example, static part I will create with editing ASPX file and designing
    web interface like this:

    <td align="center" width="100%" height="100%">
    <table border="0" cellpadding="0" cellspacing="0" width="100%"
    height="100%" id="hMenuTable" runat="server">
    <tr id="hMenuRow" runat="server">
    <td><IMG SRC="images/design/UIDesign_r3_c3.gif" width="13"
    height="29"></td>
    <td background="images/design/UIDesign_r3_c3.gif"
    width="100%">
    <IMG SRC="images/design/px.gif" width="100"
    height="1"><br>
    </td>
    </tr>
    </table>
    </td>

    Part of the interface that I wanna to create dynamicly should be content few
    cells insite the row shown few rows ip in the part of HTML code.
    I succed to create combination of cells and rows that I need. One of that
    rows have cell that I wanna to fill with complex content like another table
    with a lot of controls. I create this row and cell like this:

    HtmlTableRow aRow = new HtmlTableRow();
    HtmlTableCell aCell = new HtmlTableCell();
    aCell.BgColor = "#FFFFFF";
    aCell.Height = "100%";
    aCell.ID = "contentField";
    aCell.ColSpan = 3*aElement.ChildNodes.Count + 2;
    aCell.Align = "center";
    aCell.VAlign = "top";
    aCell.InnerHtml = ""
    aRow.Cells.Add(aCell);
    hMenuTable.Rows.Add(aRow);

    It's not a problem for me to put string which will be HTML code inside
    aCell.InnerHtml = "<span>something</span>"
    but...
    How can I include let's say calendar control in this cell!? (
    <ASP:Calendar> )
    I can not simply write
    aCell.InnerHtml = "<asp:Calendar id="Calendar1"
    runat="server"></asp:Calendar>" cause it will be represented as a text.

    Would you help me about this?
    regards
    Vasil Buraliev
     
    Vasko Buraliev, Sep 22, 2003
    #1
    1. Advertising

  2. Hi

    Put runat=server and id attribute attirbute for tr tag in
    table control.

    in cs you can try this
    tempRow.Cells.Add(tempCell);

    HTH
    Ravikanth


    >-----Original Message-----
    >Hey folks,
    >
    >I'm trying to generate create interface that should be

    consist static part
    >and dynamic part.
    >For example, static part I will create with editing ASPX

    file and designing
    >web interface like this:
    >
    ><td align="center" width="100%" height="100%">
    > <table border="0" cellpadding="0" cellspacing="0"

    width="100%"
    >height="100%" id="hMenuTable" runat="server">
    > <tr id="hMenuRow" runat="server">
    > <td><IMG

    SRC="images/design/UIDesign_r3_c3.gif" width="13"
    >height="29"></td>
    > <td

    background="images/design/UIDesign_r3_c3.gif"
    >width="100%">
    > <IMG SRC="images/design/px.gif"

    width="100"
    >height="1"><br>
    > </td>
    > </tr>
    > </table>
    ></td>
    >
    >Part of the interface that I wanna to create dynamicly

    should be content few
    >cells insite the row shown few rows ip in the part of

    HTML code.
    >I succed to create combination of cells and rows that I

    need. One of that
    >rows have cell that I wanna to fill with complex content

    like another table
    >with a lot of controls. I create this row and cell like

    this:
    >
    >HtmlTableRow aRow = new HtmlTableRow();
    >HtmlTableCell aCell = new HtmlTableCell();
    >aCell.BgColor = "#FFFFFF";
    >aCell.Height = "100%";
    >aCell.ID = "contentField";
    >aCell.ColSpan = 3*aElement.ChildNodes.Count + 2;
    >aCell.Align = "center";
    >aCell.VAlign = "top";
    >aCell.InnerHtml = ""
    >aRow.Cells.Add(aCell);
    >hMenuTable.Rows.Add(aRow);
    >
    >It's not a problem for me to put string which will be

    HTML code inside
    >aCell.InnerHtml = "<span>something</span>"
    >but...
    >How can I include let's say calendar control in this

    cell!? (
    ><ASP:Calendar> )
    >I can not simply write
    >aCell.InnerHtml = "<asp:Calendar id="Calendar1"
    >runat="server"></asp:Calendar>" cause it will be

    represented as a text.
    >
    >Would you help me about this?
    >regards
    >Vasil Buraliev
    >
    >
    >.
    >
     
    Ravikanth[MVP], Sep 22, 2003
    #2
    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. Kristof Pauwels
    Replies:
    1
    Views:
    433
    Rahul Singh
    Jul 27, 2003
  2. Henke
    Replies:
    5
    Views:
    674
    Munsifali Rashid
    Dec 30, 2003
  3. Henke
    Replies:
    0
    Views:
    1,521
    Henke
    Feb 26, 2004
  4. DaWoE

    Creating a form dynamicly

    DaWoE, Sep 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    597
    DaWoE
    Sep 1, 2004
  5. robk

    OnItemDataBound - creating dynamicly radiobuttonlist

    robk, Jul 20, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    301
Loading...

Share This Page