if (radioButton1.Text.Equals(da.Tables["mytest"].Rows[0][2].ToString()))
{
radioButton1.Checked = true;
}
else
{
radioButton2.Checked=true;
}
我的radioButton1.Text 为“男”
da.Tables["mytest"].Rows[0][2].ToString() 从数据库中返回的string 也是“男”
为什么两个string始终不相等
radioButton1.Checked = true;
这个条件一直没进去! 求解!
{
radioButton1.Checked = true;
}
else
{
radioButton2.Checked=true;
}
我的radioButton1.Text 为“男”
da.Tables["mytest"].Rows[0][2].ToString() 从数据库中返回的string 也是“男”
为什么两个string始终不相等
radioButton1.Checked = true;
这个条件一直没进去! 求解!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货