Sub GridView1_RowCommand(ByVal source As Object, ByVal e As GridViewCommandEventArgs)
If e.CommandName = "Add" Then
Dim inputNameform As TextBox = CType(GridView1.FooterRow.FindControl("inputNameform"), TextBox)
Dim filPicture As HtmlInputFile = CType(GridView1.FooterRow.FindControl("filPicture"), HtmlInputFile)
Dim strFileName As String
If Trim(filPicture.PostedFile.FileName) <> "" Then
strFileName = System.IO.Path.GetFileName(filPicture.Value)
filPicture.PostedFile.SaveAs(Server.MapPath("file/FireDrill52/" & strFileName))
strSQL = "INSERT INTO form (Idtypeform,Nameform,Fileform) " & _
" VALUES ('" & Request.QueryString("Idtypeform") & "','" & inputNameform.Text & "','file/FireDrill52/" & strFileName & "') "
objCmd = New OleDbCommand(strSQL, objConn)
objCmd.ExecuteNonQuery()
GridViewBindData()
GridView1BindData()
End If
End If
End Sub