Consider doing e.Item.FindControl("controlId")
like
TextBox txt = (TextBox) e.Item.FindControl("userName");
if (txt != null){
//found it
}
it's less performant but 100% more readable and won't change when you alter
your html code....also, in case ur wondering, [0] is probably blank 'cuz I
believe whitespaces are converted to literals...which makes the [0] method
even more unreliable.
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Dave" <da*********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello.
How can I field value in ItemDataBound event of the DataGrid control?
I'm writing:
e.Item.Cells[0].Text;
But this always returns empty string:(
Thank You.