i am receiving this problem
Conversion from type \'DBNull\' to type \'String\' is not valid.
Line 501: hfSupEmail.
To handle it from code, here is a small extension method
Imports Microsoft.VisualBasic
Imports System.Runtime.CompilerServices
Public Module HTMLExtensionMethods
_
Public Function DefaultIfDBNull(Of T)(ByVal obj As Object) As T
Return If(Convert.IsDBNull(obj), CType(Nothing, T), CType(obj, T))
End Function
End Module
Call it like this.
hfSupEmail.Value = dt.Rows(0)("SupEmail").DefaultIfDBNull(Of String)()