In this article we will introduce with Table control in ASP.NET using C#.
Table Example in ASP.NET using C#
Table control in ASP.NET contains rows and columns. You can set the style of table by using CSS or inline style. In this example we use a Table control. This table contain four column Serial No., Name, Post and Address and data are showing in other rows.
Table.aspx (Design Page):

Table.aspx (source code):
<%@ Page Title="" Language="C#" MasterPageFile="~/RoseindiaMaster.master"
AutoEventWireup="true"
CodeFile="Table.aspx.cs" Inherits="Table" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
.style2
{
width: 83px;
font-weight: bold;
}
.style3
{
width: 83px;
font-weight: bold;
height: 31px;
background-color: #3399FF;
}
.style4
{
height: 31px;
font-weight: bold;
background-color: #3399FF;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div>
<h2 style="color: Green">
Table in ASP.NET 4 , C#</h2>
<br />
<table align="left" bgcolor="#669999" cellpadding="0"
cellspacing="0" style="border: thin solid #333300;
width: 445px; height: 174px; text-align: center;" border="2">
<tr>
<td class="style3">Serial No.</td>
<td class="style4">Name</td>
<td class="style4">Post</td>
<td class="style4">Address</td>
</tr>
<tr>
<td class="style2">1.</td>
<td>Rahul</td>
<td>Flex Developer</td>
<td>Delhi</td>
</tr>
<tr>
<td class="style2">2.</td>
<td>Manish</td>
<td>Java Developer</td>
<td>Banglore</td>
</tr>
<tr>
<td class="style2">3.</td>
<td>Devesh</td>
<td>Web Designer</td>
<td>Mumbai</td>
</tr>
<tr>
<td class="style2">4.</td>
<td>Harendra</td>
<td>.Net Developer</td>
<td>Noida</td>
</tr>
</table>
</div>
</asp:Content>
Output:


[ 0 ] Comments