ANSWERS: 4
  • Need more details, please. For what purpose? Are you trying to show data from a database table? Or are you just talking about creating an HTML table that can be changed on the fly?
  • You can get the free source code to generate dynamic table at http://programming.top54u.com/post/ASP-Net-C-sharp-Code-to-Create-Dynamic-Tables.aspx Also learn database connectivity with SQL Server and MS Access.
  • Are talking about the database table or the HTML table.
  • public void CreateDynTable(int count,string RowDes,int rowNumber) { TableRow trow = new TableRow(); TableCell tcell1 = new TableCell(); TableCell tcell2 = new TableCell(); Label lbl1 = new Label(); Label lbl2 = new Label(); lbl1.ID = "count" + rowNumber; lbl1.Attributes.Add("runat", "Server"); lbl1.Attributes.Add("Name", "count" + rowNumber); //Text Value lbl1.Text = count + "."; lbl2.ID = "reqDesc" + rowNumber; lbl2.Attributes.Add("runat", "Server"); lbl2.Attributes.Add("Name", "reqDesc" + rowNumber); //Text Value lbl2.Text = reqDesc; tcell1.Controls.Add(lbl1); tcell1.Style["VERTICAL-ALIGN"] = "top"; tcell2.Controls.Add(lbl2); trow.Cells.Add(tcell1); trow.Cells.Add(tcell2); Table1.Rows.Add(trow); }

Copyright 2018, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy