protected void btnShow_Click(object sender, EventArgs e) { //I need to dynamically create the instance with code, for instance table[i] needs to be systematically created //int i = 0; System.Web.UI.HtmlControls.HtmlTable Htable = new HtmlTable(); System.Web.UI.HtmlControls.HtmlTableRow Hrow = new HtmlTableRow(); System.Web.UI.HtmlControls.HtmlTableCell cell01 = new HtmlTableCell(); //I want to try to concatenate //use a literal to build the statement, then assign a differents literal the text alue of the statement string. System.Web.UI.HtmlControls.HtmlTableCell cell02 = new HtmlTableCell(); System.Web.UI.HtmlControls.HtmlTableCell cell03 = new HtmlTableCell(); Label Label1 = new Label(); Label1.Text = "1"; Label Label2 = new Label(); Label2.Text = "Tom Jenkins"; Label Label3 = new Label(); Label3.Text = "*****@*****.**"; Literal lit1 = new Literal(); Literal lit2 = new Literal(); Literal lit3 = new Literal(); lit1.Text = "Literal 1"; lit2.Text = "Literal 2"; lit3.Text = "Literal 3"; Htable.Border = 1; cell01.InnerHtml = "ID"; cell02.InnerHtml = "Name"; cell03.InnerHtml = "email"; Hrow.Cells.Add(cell01); Hrow.Cells.Add(cell02); Hrow.Cells.Add(cell03); Htable.Rows.Add(Hrow); cell01 = new HtmlTableCell(); cell02 = new HtmlTableCell(); cell03 = new HtmlTableCell(); cell01.InnerHtml = lit1.ToString(); cell02.InnerHtml = lit2.ToString(); cell03.InnerHtml = lit3.ToString(); Hrow = new HtmlTableRow(); Hrow.Cells.Add(cell01); Hrow.Cells.Add(cell02); Hrow.Cells.Add(cell03); Htable.Rows.Add(Hrow); this.Controls.Add(Htable); //do while (i < 3) // { // i++; // } //string[] arr = new string[4]; // Initialize //arr[0] = "one"; // Element 1 //arr[1] = "two"; // Element 2 //arr[2] = "three"; // Element 3 //arr[3] = "four"; // Element 4 //// Loop over strings //foreach (string s in arr) //{ // Console.WriteLine(s); //} //// Array a1 = new Array[1, 2, 3, 4]; // string[] a1 = new string[2]; // a1[0] = "First Element"; // a1[1] = "Second Element"; // a1[2] = "Third Element"; // foreach (string s in a1) // { // Label lba = new Label(); // lba.Text = a1[i].ToString(); // Console.WriteLine(s); // } // for i = o while i is less than row count plus or minus 1, loop through and array and do something to practice looping data with arrays, collections, and tables. //A tables, b for each loops with different types of data, and C using an array to work on this and add data. Use these controls in an array. //DynamicControlsPlaceholder (DCP) //look into web controls, what they cand be used for, and how they differ from HTML table contr }