Home » FAQ » ASP.NET » ADO.NET » How to find the null fields in the datareader
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 }
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with