日期:2014-05-19  浏览次数:20426 次

熟悉ASP.NET的GRIDVIEW控件的进
txtBox.Text   =   GridHead.SelectedRow.Cells[1].Text;   我这样写的话GridHead.SelectedRow.Cells[1].Text;没有值的话,就会自动得出&nbsp,我想他的值为空,他就得出空,不想要&nbsp这怎么解决啊?

------解决方案--------------------
GridHead.SelectedRow.Cells[1].Text.Replace( "&nbsp ", " ");
------解决方案--------------------
GridHead.SelectedRow.Cells[1].Text.Replace( "&nbsp ", " ");