G
Guest
We tried the following:
(1)
if(RadioButtonList1.SelectedItem.Text.CompareTo("bug")==0)
row["btype"]='B';
else
row["btype"]='E';
and
(2)
if(DropDownList1.SelectedItem.Text.CompareTo("Open")==0)
cmd1.Parameters["@bstatus"].Value='O';
else if(DropDownList1.SelectedItem.Text.CompareTo("Closed")==0)
cmd1.Parameters["@bstatus"].Value='C';
else if(DropDownList1.SelectedItem.Text.CompareTo("Fixed")==0)
cmd1.Parameters["@bstatus"].Value='F';
else if(DropDownList1.SelectedItem.Text.CompareTo("Work Around")==0)
cmd1.Parameters["@bstatus"].Value='W';
else
cmd1.Parameters["@bstatus"].Value='I';
< NOW Wondering.. Why is that in the first example the ifs are reached but
not in the second > Please nyone, knowing the reason.. do share..!! Thnks..
By the way: we finally ended up using DropDownList1.SelectedIndex
(1)
if(RadioButtonList1.SelectedItem.Text.CompareTo("bug")==0)
row["btype"]='B';
else
row["btype"]='E';
and
(2)
if(DropDownList1.SelectedItem.Text.CompareTo("Open")==0)
cmd1.Parameters["@bstatus"].Value='O';
else if(DropDownList1.SelectedItem.Text.CompareTo("Closed")==0)
cmd1.Parameters["@bstatus"].Value='C';
else if(DropDownList1.SelectedItem.Text.CompareTo("Fixed")==0)
cmd1.Parameters["@bstatus"].Value='F';
else if(DropDownList1.SelectedItem.Text.CompareTo("Work Around")==0)
cmd1.Parameters["@bstatus"].Value='W';
else
cmd1.Parameters["@bstatus"].Value='I';
< NOW Wondering.. Why is that in the first example the ifs are reached but
not in the second > Please nyone, knowing the reason.. do share..!! Thnks..
By the way: we finally ended up using DropDownList1.SelectedIndex