Go to DotNetFunda.com
 Online : 1695 |  Welcome, Guest!   Login
 
<<= Please see left side tutorials menu.


Silverlight Tutorials | Report a Bug in the Tutorial

Interesting?   Share and Bookmark this

asp:Table control
Table control is used to structure a web pages. In other words to divide a page into several rows and colums to arrange the information or images.
 
Table control is used to structure a web pages. In other words to divide a page into several rows and colums to arrange the information or images. When it is rendered on the page, it is implemented through <table> HTML tag.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <table> tag.

We can simply use HTML <table> control instead of using asp:Table control. However many of one benefits of using asp:Table control is we can dynamically add rows or columns at the runtime or change the appearance of the table.
You can skip ID property of the TableRow or TableCell, however it is advisable to write these property otherwise you will not be able to play with these controls.

Following are some important properties that are very useful.
BackImageUrl Used to Set background image of the table
Caption Used to write the caption of the table.
DEMO : Table Show Source Code
Demo of asp:Table control
Row 1 - Cell 1 Row 1 - Cell 2
Row 2 - Cell 1 Row 2 - Cell 2
Change Table Back Color
    <asp:Table ID="Table2" runat="Server" CellPadding="2" CellSpacing="1" 
        BorderColor="CadetBlue" Caption="Demo of asp:Table control" BorderWidth="1" BorderStyle="Dashed">
            <asp:TableRow ID="TableRow2" runat="Server" BorderWidth="1">
                <asp:TableCell ID="TableCell4" runat="Server" BorderWidth="1">
                    Row 1 - Cell 1
                </asp:TableCell>
                <asp:TableCell ID="TableCell5" runat="Server">
                    Row 1 - Cell 2
                </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow3" runat="Server">
                <asp:TableCell ID="TableCell6" runat="Server">
                    Row 2 - Cell 1
                </asp:TableCell>
                <asp:TableCell ID="TableCell7" runat="Server">
                    Row 2 - Cell 2
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
                    




About Us | The Team | Advertise | Contact Us | Feedback | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found copied contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
All rights reserved to DotNetFunda.Com. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks.
(Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher)