我试图在发送短信之前检查下拉框中的特定单词这就是我所拥有的
if (grdvHandSets.Rows[i].Cells[4].Text == "Port" && grdvHandSets.Rows[i].Cells[16].Text != String.Empty) //Only send SMS if Type = Port and ConDate isnt empty
{
SmsBody = string.Format("Your order has been despatched to" + lblDespatchPostCode.Text + ". via Royal Mail next day special delivery. Your number/s are due to transfer on" + grdvHandSets.Rows[i].Cells[16].Text + ". Kind Regards BPD");
//objSms.SendSms(phonenum, SmsBody);
}
它是我说 grdvHandSets.Rows[i].Cells[4].Text == "Port" 的第一部分,这是一个下拉框,我认为文本可以工作,但在调试时它会出现 ""....有什么帮助吗?