Posted on: 8/21/2013 10:33:53 PM | Views : 662

What is wrong with either of these?
I receive the following when i debug:
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox
 
TextBox txtQty = (TextBox)row.Cells[1].Controls[0]; TextBox txtPart = (TextBox)row.Cells[2].Controls[0]; TextBox txtUnit = (TextBox)row.Cells[3].Controls[0]; var txtQty = (TextBox)row.Cells[1].Controls[0]; var txtPart = (TextBox)row.Cells[2].Controls[0]; var txtUnit = (TextBox)row.Cells[3].Controls[0];
...

Go to the complete details ...