im trying to check for a specific word in a dropdown box before sending an SMS
this is what i have
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);
}
Its the first part where im saying grdvHandSets.Rows[i].Cells[4].Text == “Port” which is a drop down box i thought text would work but it comes up with “” when im debugging…. any help?
Try this: