protected void btnSubmit_Click(object sender, EventArgs e)
{
foreach (GridViewRow gridRow in GridView1.Rows)
{
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);
Response.Write("sFee:"+sfee);
}
}
}
}

Abhay ShankerRank #375 · 6.7K reputationPosted Dec 24, 2013, 4:41 AM EST
Dhirendra MisraRank #4,173 · 360 reputationPosted Dec 26, 2013, 9:38 PM EST
Your .cs code seems to be fine, can you check on .aspx code if textbox is having property runat="server" at .aspx code with gridview markup?
Thanks