cn = new SqlConnection(ConfigurationManager.ConnectionStrings["lap_connection"].ConnectionString); cmd = new SqlCommand("SELECT COUNT( pat_id) AS patient_test FROM patient_test_data WHERE dbo.patient_test_data.test_date >= cast(getdate() as Date) AND dbo.patient_test_data.pat_id = 4;", cn); cmd.CommandType = CommandType.Text; cmd.Connection.Open(); dr = cmd.ExecuteReader(CommandBehavior.CloseConnection); while (dr.Read()) { int number_test = int.Parse(dr["patient_test"].ToString()); for (int number = int.Parse(dr["patient_test"].ToString()); number <= number_test; number++) { TextBox txt = new TextBox(); //txt.Text = dr["Col1"].ToString(); TextBox txt2 = new TextBox(); //txt2.Text = dr["Col2"].ToString(); TextBox txt3 = new TextBox(); //txt3.Text = dr["Col3"].ToString(); this.Controls.Add(txt); this.Controls.Add(txt2); this.Controls.Add(txt3); } }
Quote:textghox txt = new textghox();
textghox
Page_init
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)