I'm designing a website for my FYP, i have an customerOrder page, and a viewOrders page, customer places order in CustomerOrder page. in viewOrders i want to display the result of sql query, in dynamically created "div" and "labels" with CSS assigned to them for each row of table, in following SqlDataReader.tnx
protected void Page_Load(object sender, EventArgs e)
{
string localCnnString =
ConfigurationManager.ConnectionStrings["LGDB"].ToString();
SqlConnection SqlCnn = new SqlConnection(localCnnString);
SqlCommand SqlCmd = new SqlCommand();
SqlDataReader dReader;
SqlCnn.Open();
SqlCmd.Connection = SqlCnn;
SqlCmd.CommandType = CommandType.StoredProcedure;
SqlCmd.CommandText = "myrpoc";
dReader = SqlCmd.ExecuteReader();
while (dReader.Read())
{
//dynamic controls
}
dReader.Close();
SqlCnn.Close();
}
}