You should try this code instead, to make sure this error goes away.
int number;
if(int.TryParse(textBox7.Text.Trim(), out number) {
UpdateCommand.Parameters.AddWithValue("@post", SqlDbType.VarChar).Value =
Convert.ToInt32(number);
}
Above code would check if the number can be converted, if it can be then it would execute the code block and the number would have the value that was converted from string to int. Also, the error won't occur, since you would execute the code only if the type is number.
Also as mentioned, you would also need to change the type of your data being passed to the database.
Int32.TryParse[
^],
Convert.ToInt32[
^] on MSDN.