VB.Net - Eval to return Nothing

~J~

~J~

Soldato
Joined
20 Oct 2003
Posts
7,558
Location
London
Anyone know how I can stop an Eval command from outputting anything?

I've attached a SQLDataSource control to my webpage and wish to set a few properties on codebehind from some of the field values that are returned.

I've got the following on my Webpage:
Code:
    <ItemTemplate><%#TimeCheck(Eval("TimeCheck"))%>
and the following on my codebehind

Code:
Protected Function TimeCheck(ByVal dt As DateTime) As DateTime
Me.pTimeCheck = dt
Return Nothing
End Function
But despite the "Return Nothing" command, I still end up with 01/01/0001 00:00:00 where the Eval is called.

Any thoughts how to achieve this?
 
Back
Top Bottom