asp:Table control
Table control is used for the structure of web pages, in other words, to organize information or images to split a page into several rows and columns.
Table control is used for the structure of a web page. In other words, to arrange the information or images to split a page into several rows and columns, when sung on the page, it is called <table> HTML The tag is implemented through.
Its properties such as backcore, foreclosure, border collar, border style, borderwidth, height etc are applied through the style of the <table> tag.
We can use HTML <table> control instead of just using asp: table control, though many advantages of using asp: table control We can add rows or columns in dynamic order or change the appearance of the table
You can skip the ID property of TableRow or TableCell, however it is advisable to write these properties 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. |
| 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>
0 comments:
Post a Comment