I am trying to add a function to my modules .vb code that I can call from the matching .ascx and I am having serious [probably mental] issues getting it to work:
.vb:
Namespace Test.DNN.Modules.TestMod
Partial Public Class TestClass
Inherits DotNetNuke.Entities.Modules.PortalModuleBase
Implements DotNetNuke.Entities.Modules.IActionable
.
.
.
Public Function LimitString(ByVal sVal As System.String)
If sVal.Length > 100 Then
sVal = sVal.Substring(0, 100)
sVal = sVal & "..."
End If
return sVal
End Function
End Class
End Namespace
Then, in my .ascx I have (with a bunch of other code):
<%# LimitString(DataBinder.Eval(Container.DataItem,"test")) %>
I just get red text telling me that the module failed to load... What am I doing wrong?
-Shaun
PS. I have also tried:
<%# Test.DNN.Modules.TestMod.TestClass.LimitString(DataBinder.Eval(Container.DataItem,"test")) %>
but removed it, since the .ascx should already be using the matching .vb files namespace.