Hello!
I have created a TemplateField inside my GridView and want to reference the Label which is in the first column of each row. I am getting an error everytime I debug?!
Can anyone please tell me what I am doing wrong? Thanks in advance!
I have created a TemplateField inside my GridView and want to reference the Label which is in the first column of each row. I am getting an error everytime I debug?!
Can anyone please tell me what I am doing wrong? Thanks in advance!
Code:
//Get the reference to the row GridViewRow gvr = (GridViewRow)(((Control)sender).NamingContainer); //Get the reference to the Evaluation Label Label lblEval = (Label)gvr.FindControl("lblEval");
Comment