Helper function problems

Discussion in 'ASP .Net Web Controls' started by Chumley the Walrus, Jun 9, 2004.

  1. I'm trying to use a helper function inside a datalist control to
    simply display an image if it exists:
    <%
    Function ShowIm(sItem as string)
    If sItem <> "" Then
    response.write <img height=13 width=16 _
    src=((Container.DataItem("Imagesubprod1"))

    End If
    End Function
    %>
    <%# ShowIm(DataBinder.Eval(Container.DataItem, "Imagesubprod1"))%>

    ...gives me an error:Statement cannot appear within a method body. End
    of method assumed. Not sure why this is happening.

    thanx
    Chum
     
    Chumley the Walrus, Jun 9, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chumley the Walrus

    Subroutine /helper function error

    Chumley the Walrus, Jun 10, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    326
    bruce barker
    Jun 10, 2004
  2. Chumley the Walrus
    Replies:
    2
    Views:
    472
    John Saunders
    Jun 15, 2004
  3. yhou
    Replies:
    1
    Views:
    421
    Sudsy
    May 26, 2004
  4. Helper function problems

    , Jul 6, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    323
    Alexey Smirnov
    Jul 7, 2007
  5. kevin
    Replies:
    1
    Views:
    374
    Kairi Zikpin
    Jul 21, 2006
Loading...

Share This Page