从gridview里的TextBox获取值的时候,为"",谁能告诉该怎么改
选中某行,获取当前行的值,Textbox的值为空,其它的值都有,这是为什么?
protected void list_SelectedIndexChanged(object sender, EventArgs e)
{
string sfhg1,hgyy1;
string qybm1 = qybm;
GridViewRow row = list.SelectedRow;
string mc = row.Cells[2].Text.Trim();
RadioButtonList rblidea = (RadioButtonList)row.FindControl("rblidea");
TextBox str = (TextBox)row.FindControl("YY");
TextBox str2 = (TextBox)row.FindControl("GG");
hgyy1 = str.Text;
string hgyy2 = str2.Text;
if (rblidea.Items[0].Selected == true)
{
sfhg1 = "1";
}
else
{
sfhg1 = "0";
}
}