C
Chumley the Walrus
I'm using a subroutine/helper function display an image (the image
would be displayed inside a datalist control's <itemtemplate> )
<script language="VB" runat="server">
Public Sub checkforimg(ByVal Imagesubprod1 As String)
If Imagesubprod1 <> "" then
response.write(Imagesubprod1)
Else
response.write("nbsp;")
End If
End Sub
</script>
.... but I get an "Overload resolution failed because no accessible
'ToString' can be called with these arguments:" error when it comes
time to check for the image as follows.
<%# checkforimg(DataBinder.Eval(Container.DataItem,
"Imagesubprod1"))%>
When I form the header for the sub as follows:
Public Sub checkforimg(ByVal Imagesubprod1 As String) As string
...i get an "Expected end of statement " error on this line
would be displayed inside a datalist control's <itemtemplate> )
<script language="VB" runat="server">
Public Sub checkforimg(ByVal Imagesubprod1 As String)
If Imagesubprod1 <> "" then
response.write(Imagesubprod1)
Else
response.write("nbsp;")
End If
End Sub
</script>
.... but I get an "Overload resolution failed because no accessible
'ToString' can be called with these arguments:" error when it comes
time to check for the image as follows.
<%# checkforimg(DataBinder.Eval(Container.DataItem,
"Imagesubprod1"))%>
When I form the header for the sub as follows:
Public Sub checkforimg(ByVal Imagesubprod1 As String) As string
...i get an "Expected end of statement " error on this line