Sunday, 7 August 2016

write a program to display table controls in asp.net

tablecontrol.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tablecontrol.aspx.cs" Inherits="our_program.tablecontrol" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    
    <form id="form1" runat="server">
<center>
    <div>
    <asp:Table ID="Table1" runat="server">
    <asp:TableHeaderRow><asp:TableCell>username</asp:TableCell>
    <asp:TableCell >address</asp:TableCell>
    <asp:TableCell>gender</asp:TableCell>
    <asp:TableCell>place</asp:TableCell>
    </asp:TableHeaderRow>
    <asp:TableRow><asp:TableCell>shafi</asp:TableCell>
    <asp:TableCell>shafi</asp:TableCell>
    <asp:TableCell>shafi</asp:TableCell>
    <asp:TableCell>shafi</asp:TableCell>

    </asp:TableRow>
<asp:TableRow>
<<asp:TableCell>pa</asp:TableCell>

</asp:TableRow>
    </asp:Table>
    
   </div>
    </form>
</body>
</html>

tablecontrol.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace our_program
{
    public partial class tablecontrol : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}

No comments:

Post a Comment