using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace AwsSdkStatusCheck { public partial class StatusCheckPage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { String instanceIdNum = "i-00ad0c2bb6c2b1296"; //String[] lines = new AwsCommandsClass().GetIdNumbers(); // int a = lines.Length; // Total number of rows. int rowCnt; // Current row count. int rowCtr; // Total number of cells per row (columns). int cellCtr; // Current cell counter int cellCnt; rowCnt = 1; cellCnt = 8; for (rowCtr = 1; rowCtr <= rowCnt; rowCtr++) { // Create new row and add it to the table. TableRow tRow = new TableRow(); Table1.Rows.Add(tRow); for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++) { // String[] retVal = new StatusCheckClass().StatusCheckDetails(lines[rowCtr - 1]); String[] retVal = new StatusCheckClass().StatusCheckDetails(instanceIdNum); // Create a new cell and add it to the row. TableCell tCell = new TableCell(); tCell.Text = retVal[cellCtr - 1]; tRow.Cells.Add(tCell); } } } } }