unable to retirve grieview footer row controle value
-
Hi I am trying to insert and delete row from the girdview but I unable to retrieve the value of textbox which I have put on the footer row the code is following Dim strEmpName As String strEmpName =Ctype(GridView1.FooterRow.FindControl("txtEmpName"), TextBox)).Text each time I am getting the value of strEmpName="" while I entering the value for insertion Thanks...
-
Hi I am trying to insert and delete row from the girdview but I unable to retrieve the value of textbox which I have put on the footer row the code is following Dim strEmpName As String strEmpName =Ctype(GridView1.FooterRow.FindControl("txtEmpName"), TextBox)).Text each time I am getting the value of strEmpName="" while I entering the value for insertion Thanks...
Try this:
For Each r1 As GridViewRow In GridView1.Rows
txtEmpName = DirectCast(r1.FindControl("txtEmpName"), TextBox)
NextGood luck,=).