and in click event i wrote
protected void btnstrength_Click(object sender, EventArgs e)
{
ArrayList cells = new ArrayList();
Table t = (Table)form1.FindControl("tblstudentstrength");
foreach (TableRow r in t.Rows)
{
foreach (TableCell cell in r.Cells)
{
cells.Add(cell.ToString());
}
}
}
after this what i have to do
Bhushan BhurePosted Aug 9, 2012, 11:39 AM
Check if its HeaderRow or TableRow
If( r.GetType () == typeof (System.Web.UI.WebControls.TableRow) )
If its tableRow then loop all controls, check if that control is TextBox, CheckBox etc... and then get its value like foreach ( Control c in cell.Controls )