Reputation: 46222
When I do the following I get a message saying Expression Expected
If (Not (String.IsNullOrEmpty(e.Item.DataItem("DueDate")) && String.IsNullOrEmpty(e.Item.DataItem("ActualDate"))) ) Then
End If
Upvotes: 1
Views: 189
Reputation: 216293
If this is VB.NET then the AND operator is AndAlso
AndAlso
and it's brother OrElse
are better because:
So your code should be
If (Not (String.IsNullOrEmpty(e.Item.DataItem("DueDate")) AndAlso String.IsNullOrEmpty(e.Item.DataItem("ActualDate"))) ) Then
....
End If
Upvotes: 1