It cannot be the line you are indicating - as Karthik Bangalore has pointed out.
It is most likely to be one of the lines similar to
intno4 = GridView2.SelectedRow.Cells[1].Text;
If Cells[1] is empty then the .Text call will generate the error you are experiencing. Similarly if there is no row selected on the GridView you will get the same error