Thursday, 22 December 2016

DYNAMIC TABLE CREATION IN C#

          //  DYNAMIC TABLE CREATION IN C#  // 




 TableRow Tr_Name = new TableRow();
            Tr_Name.ID = "Tr_Name";


            TableCell  Td_Name = new TableCell();
                   Tr_Name.Cells.Add(Td_Name );

            Td_Name .Text = "Component_Place Here";
            Tr_Name .Cells.Add(Td_Name );

         


            TableName.Rows.Add(Tr_Name);



  //  DYNAMIC TABLE CREATION IN ASPX  // 


 <asp:table id="TableName" runat="server" width="100%" border="1" colspan="4" style="background-color: #d0d8e8;" align="center"></asp:table>

1 comment: