[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1301
  • Last Modified:

how to set <asp:table height width

I have the following  .aspx page

<html>
<body scroll="no">
<asp:Table runat="server" ID="tblScreen">
        <asp:TableRow runat="server" ID="trHead" Visible="false">
            <asp:TableCell ID="TimeSinceRefresh" runat="server"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow runat="server" ID="trBody" BackColor="black">
            <asp:TableCell runat="server">
                <iframe runat="server" id="iContent" frameborder="0"></iframe>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
</body>
</html>

I have 2 questions
1. How can i set the asp:table Height, Width to be exactly that of the page.
2. How can i make the iFrame which is part of the row "trbody" to occupy the entire table space.

Please help me!!!
0
Collindsouza
Asked:
Collindsouza
3 Solutions
 
frodomanCommented:
Set height and width to "100%"
0
 
CollindsouzaAuthor Commented:
i tried that.. but i does'nt work...
0
 
samtran0331Commented:
there's some CSS that needs to be applied to the page and the table also for a "full height" table to work consistently:
http://apptools.com/examples/tableheight.php

you can do a "view source" on the very last example on the page.
0
 
RejojohnyCommented:
can you please post the code that did not work .. setting it to 100% should have worked .. did you set that to the iframe too and you will also need to set that for the row and column where the iframe is .. ?

<asp:Table runat="server" ID="tblScreen" style="height:100%;width:100%">
        <asp:TableRow runat="server" ID="trHead" Visible="false" >
            <asp:TableCell ID="TimeSinceRefresh" runat="server"></asp:TableCell>
        </asp:TableRow>
        <asp:TableRow runat="server" ID="trBody" BackColor="black" style="height:100%;width:100%">
            <asp:TableCell runat="server" style="height:100%;width:100%">
                <iframe runat="server" id="iContent" frameborder="0" style="height:100%;Width:100%;"></iframe>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>

in the code above, as per your requirement, you might have to tweek the percentages for the table column and row where the iframe is placed ..

Rejo
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now