Torna al Thread

sql_cmd.CommandText = "select * from rapporti where id_int = '" + 1 + "'"; rowReader = sql_cmd.ExecuteReader(); while (rowReader.Read()) { for (int y = 0; y < cblist.Items.Count; y++) { if ( Convert.ToString(rowReader["id"] ) == Convert.ToString( cblist.Items[y] ) ) // Per confrontarli converto i due valori in stringa, ma dovrebbe essere possibile anche farlo con un int { cblist.SetItemChecked(y, true); } }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5