User288213138 posted
Hi Baiju EP,
Conversion from type 'DBNull' to type 'String' is not valid.
If you want to assign the value to presl.Text, Before that you need to check whether the table has the null value with it or not.
If Not IsDBNull(dt9.Tables("LEAVE").Rows(0).Item(0)) Then
presl.Text = dt9.Tables("LEAVE").Rows(0).Item(0)
End If
But if you want to assign the null value to presl.Text, you can try to convernt cell value to string.
presl.Text = dt9.Tables("LEAVE").Rows(0).Item(0).ToString()
Best regards,
Sam