日期:2014-05-18  浏览次数:21093 次

如何转换 
this.water_star.Text = GridView1.SelectedRow.Cells[2].Text;
我做了个点击GridView1中行就 赋值给this.water_star.Text
但当GridView1.SelectedRow.Cells[2].Text从数据库中得到为空时
this.water_star.Text赋值变为“ ”,我想得到空值

------解决方案--------------------
this.water_star.Text=GridView1.SelectedRow.Cells[2].Text.Replace(" ","")
------解决方案--------------------
或者用判断做