判断:如果gridview第5列的值是1-12,则第6列分别显示显示我要的不同信息. for (int i = 0; i < getData.Rows.Count; i++)
{
Literal ll = (Literal)getData.Rows[i].Cells[5].FindControl("Literal1");
if (getData.Rows[i].Cells[4].Text=="1")
{ ll.Text = "asdfasvcsvwdqerw";
}
else
{
ll.Text = "not";
}
}
这样写为什么只能得到not??????????????
{
Literal ll = (Literal)getData.Rows[i].Cells[5].FindControl("Literal1");
if (getData.Rows[i].Cells[4].Text=="1")
{ ll.Text = "asdfasvcsvwdqerw";
}
else
{
ll.Text = "not";
}
}
这样写为什么只能得到not??????????????
看看你的数据吧