Tarun

Tarun

  • 1.3k
  • 447
  • 17.2k

Getting Null Reference in Gridview RowIndex

May 4 2023 11:10 AM

here in the 7th line i am unable to get selected index cell value pls help me to resolve. 

protected void lnkbtnVerify_Click(object sender, EventArgs e)
{
   try
   {
       LinkButton btn = (LinkButton)sender;
       GridViewRow Grow = (GridViewRow)btn.NamingContainer;
       Label lblBeneName = (Label)Grow.FindControl("RowNo");
   }
   catch(Exception e)
   {
       throw e;
   }
}

 


Answers (2)