Forums
This topic is locked
Problems with NULL in formatted dyn text
01 Aug 2006 04:01:23 S B posted:
I am unable to catch a NULL value before the datetime parse function.. the net effect is that when the page loads, and IF there is a NULL in the date field, I get the string mismatch type error. Please take a look at the code below to help me understand where I am going wrong =( I am a little bit of a beginner with the Dreamweaver .NET stuff<td><span class="style2">First Raid </span></td>
<td><%# PlayerSummary.FieldValue("MinOfDate", null) == null ? "NONE" : DateTime.Parse(PlayerSummary.FieldValue("MinOfDate", Container)).ToString("D" %></td>
<td>Date of first raid (D1) </td>
Just to add a little more background, I am populating some data in an HTML table from an SQL Server db. Everything works fine (NULLs cause no problem) except in the fields that have special formatting code on them and when there is a NULL value in the dataset field.