JAYRAM

JAYRAM

  • NA
  • 272
  • 215.4k

in gridview retrive row coloum value .....error

Feb 11 2013 12:58 AM
protected void btnSend_Click(object sender, EventArgs e)
    {
        List<string> mobilenumbers = new List<string>();
        List<string> total = new List<string>();
        if (gv.Rows.Count > 0)
        {
            for (int i = 0; i <= gv.Rows.Count - 1; i++)
            {
                GridViewRow row = gv.Rows[i];
                CheckBox chk = (CheckBox)row.FindControl("chkSelect");
                if (chk.Checked == true)
                {


                    mobilenumbers.Add((gv.Rows[i].Cells[5].Text));
                   total.Add((gv.Rows[i].Cells[4].Text));
                }


            }
            clssms obj = new clssms();
            for (int j = 0; j <= mobilenumbers.Count - 1; j++)
            {




                string str = obj.SendSMS("username", "password", "91" + mobilenumbers[j] + "", "" + mobilenumbers[j] + "", "SMSCntry", "N", "N");
                    Response.Write(str);
                }
the above code is working ....but when i change total[j] instead of mobilenumber[j] ..it shows error  message not provided
{
string str = obj.SendSMS("sama", "sama", "91" + mobilenumbers[j] + "", "" +total[j]+ "", "SMSCntry", "N", "N");
                    Response.Write(str);
}



Answers (1)