Try VB.NET
txtCountry.Text = dr('FieldName').ToString()
C#
txtCountry.Text = dr['FieldName'].ToString();
or Try VB.NET
If dbReader('fieldname').ToString= DBnull.Value.ToString()
’Empty field value
Else
’Display value
End if
C#
if (dbReader['fieldname').ToString() == DBNull.Value.ToString() )
{
//Empty field value
}
else
{
//display Value
}
Share with