public bool inserstumark(Commonpropertis comp, System.Web.UI.WebControls.GridView grid)
{
bool result = false;
if (comp.EXAMNAMES != "Annual Exam" || comp.EXAMNAMES!="Half yearly Exam"|| comp.EXAMNAMES!="Quartely Exam" )
{
int rows = grid.Rows.Count;
for (int i = 0; i < rows; i++)
{
// comp.ADMISSIONNUMBER = Convert.ToInt32(grid.Rows[i].Cells[0].Text);
System.Web.UI.WebControls.Label lbl = grid.Rows[i].FindControl("lblrollno") as System.Web.UI.WebControls.Label;
comp.ROLLNUMBER = lbl.Text;
// comp.NAME = grid.Rows[i].Cells[2].Text;
System.Web.UI.WebControls.TextBox txt = grid.Rows[i].FindControl("mark2txt") as System.Web.UI.WebControls.TextBox;
comp.EXTERNALMARK =Convert.ToInt32(txt.Text);
result= userdao.inserstumark1(comp);
}
return result;
}
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Oct 6, 2013, 1:57 AM
When are you trying to get the cell value? On RowCommand ?
Please post your grid markup