Dim con As New SqlConnection(ConnectionStrings("dev").ConnectionString)
Dim row As GridViewRow = gvwCurrentMaterial.Rows(e.RowIndex)
Dim newFilename As String = CType(row.Cells(2).Controls(0), TextBox).Text
Dim cmd As New SqlCommand("Update dbo.trn_fileSystemCourseMaterials Set originalFilename =" & newFilename & _
" Where materialsID =" & Convert.ToInt32(Request.Cookies("courseid").Value), con)
cmd.CommandType = CommandType.Text
con.Open()
cmd.ExecuteNonQuery()
con.Close()
populateCurrentCourseMaterial(Convert.ToInt32(Request.Cookies("courseid").Value))
|