I have a VB page with a gridview on it. The gridview allows the user to add a value and update the DB with it. THe type is Double. How do I set the value of the cell to NULL if the user changes a value from a number to blank. for example the gridview has the value of 10 in it and they delete it I want the DB to go back to NULL.
I have tried the following but it doesnt change anything.
If text = "" Then
amendedvalue = Nothing
Else
amendedvalue = CDbl(CType(gv.Rows(x).Cells(2).FindControl("txtstartH"), TextBox).Text)
UpdateData(amendedvalue, id)
End If