Suppressing Null Fields

I have a formview only in view mode that displays when a record is selected in a gridview on a web page. There are a couple of fields that can be null. How can I not display the labels that contain those values if the field is null in the database?
Carla RomereDirector of Information TechnologyAsked:
Who is Participating?
junkymail1Connect With a Mentor Commented:
I ran into this problem as well.  All I could figure out to do was to do a try on the data:

Table.PROD2_DATE = (DateTime)dataRow[0]["PROD2_DATE"];
Table.PROD2_DATE = Date.Now();

My page would blow up if I didn't check if the values were null.  Hope it helps.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.