My function name not being declared error

  • Thread starter Thread starter Chumley the Walrus
  • Start date Start date
C

Chumley the Walrus

I'm trying to use a helper function in code behind inside a datalist
control . Below is my page directive:

<%@ Page Language="VB" Codebehind="datehelp.aspx.vb" debug="true"%>

...then i am wrapping helper function call around the variable I want
to parse from:

<ItemTemplate>

<%# checknulldate(DataBinder.Eval(Container.DataItem, "showdate")) %>
</ItemTemplate>


....but I keep getting a "checknulldate not declared" error. Am I
calling it wrong?

chumley
 
Everything looks good Chumley....if this was c#, it could be a case
issue...other than that my best guess is that the codebehind hasn't been
recompiled??

Karl
 
I believe that checknulldate should be public or protected.
If the parameter to checknulldate is a DateTime you my need to cast the
result of DataBinder.Eval, like so:

<%# checknulldate((DateTime)DataBinder.Eval(Container.DataItem, "showdate"))
%>
 
I thought the same thing...CheckNullDate needs to be anything but
private..but the error message would specific to either case you point out.

Karl
 
Back
Top