Hello.
I'm using the following code to fill a combobox on a Windows form:
private void FillCboRelation (){
using(SqlComman d sqlStatement = new SqlCommand("sp_ RelationList",c nn)) {
using(SqlDataRe ader rdReader=sqlSta tement.ExecuteR eader()){
while(rdReader. Read()){
cboRelation.Ite ms.Add(rdReader["FullName1"].ToString());
}//end while
}//end using rdReader
}//end using sqlStatement
}
When using a combobox on a webform I can use for instance
cboRelation.Ite ms[cboRelation.Ite ms.Count-1].Value=rdReader["RelationId "].To
String();
to add some data to the value property of the dropdownlist.
Is there a way to do something similar on the combobox?
Goos.
I'm using the following code to fill a combobox on a Windows form:
private void FillCboRelation (){
using(SqlComman d sqlStatement = new SqlCommand("sp_ RelationList",c nn)) {
using(SqlDataRe ader rdReader=sqlSta tement.ExecuteR eader()){
while(rdReader. Read()){
cboRelation.Ite ms.Add(rdReader["FullName1"].ToString());
}//end while
}//end using rdReader
}//end using sqlStatement
}
When using a combobox on a webform I can use for instance
cboRelation.Ite ms[cboRelation.Ite ms.Count-1].Value=rdReader["RelationId "].To
String();
to add some data to the value property of the dropdownlist.
Is there a way to do something similar on the combobox?
Goos.
Comment