"Bill Gower" <firstname.lastname@example.org> wrote in message
> I have an cell which contains a field member which is filled with
> String.Empty. When I retrieve the value in the cell with
> Cells.Text.ToString() and try to compare it to String.Empty, I can't
> because it contains " ".
Yes - that's how empty GridView cells are rendered in HTML. A GridView is
nothing more than an HTML table by the time ASP.NET has rendered it to the
client browser - the rows are <tr> elements and the individual cells are
<td> elements. Some browsers have problems displaying <td> elements which
are completely empty, specifically with regard to borders etc, so ASP.NET
inserts to prevent this.
> I really don't want to compare the value to that
??? Why on earth not?
if (Cells.Text.ToString() == " ")
// do something
What could be simpler...?