i am using the following code... I am getting null.... Anyone help me..
foreach (GridViewRow gridRow in GridView1.Rows)
{
Label lbl = (Label)gridRow.FindControl("lblID");
TextBox serviceFee = (TextBox)gridRow.FindControl("txtServiceFee");
TextBox typingFee = (TextBox)gridRow.FindControl("txtTypingFee");
TextBox govermentFee = (TextBox)gridRow.FindControl("txtGovermentFee");
int customerTypeId = Convert.ToInt32(lbl.Text);
string sfee = Convert.ToString(serviceFee.Text);
}
}

Tirthak Shah196 reputationPosted Dec 23, 2013, 11:21 PM EST
TextBox serviceFee = (TextBox)e.Row.FindControl("txtServiceFee");
If You r using Rowbound data event.