Checking For Null DB Fields

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Troy

    #1

    Checking For Null DB Fields

    After binding my data to the datalist I have created this function. I am
    recieving an error:

    BC30289: Statement cannot appear within a method body. End of method
    assumed.

    Does anyone have any clue what is going on here?
    ---------------------------------------------
    Function cnCustBullet15( ByVal CustBullet15 As String) as String
    If IsDBNull(CustBu llet15)
    Return "<tr><td>NU LL VALUE</td></tr>"
    Else
    Return "<tr><td>" & CustBullet15 & "</td></tr>"
    End If
    End Function


    <asp:Datalist id="customers" runat="server">
    <HeaderTemplate >
    <table border="0">
    </HeaderTemplate>
    <ItemTemplate >
    <%# cnCustBullet15( Container.DataI tem("CustBullet 15"))%>
    </ItemTemplate>
    <FooterTemplate >
    </table>
    </FooterTemplate>
    </asp:DataList>


    --
    Thanks!

    Troy





  • Troy

    #2
    Re: Checking For Null DB Fields

    Both of those were correct answers. Thank you. However, I am getting the
    same error. Any other clues?

    --
    Thanks!

    Troy



    "Troy" <devteam.at.cyb erwarehouse.com > wrote in message
    news:OJtarKCaDH A.1940@TK2MSFTN GP10.phx.gbl...[color=blue]
    > After binding my data to the datalist I have created this function. I am
    > recieving an error:
    >
    > BC30289: Statement cannot appear within a method body. End of method
    > assumed.
    >
    > Does anyone have any clue what is going on here?
    > ---------------------------------------------
    > Function cnCustBullet15( ByVal CustBullet15 As String) as String
    > If IsDBNull(CustBu llet15)
    > Return "<tr><td>NU LL VALUE</td></tr>"
    > Else
    > Return "<tr><td>" & CustBullet15 & "</td></tr>"
    > End If
    > End Function
    >
    >
    > <asp:Datalist id="customers" runat="server">
    > <HeaderTemplate >
    > <table border="0">
    > </HeaderTemplate>
    > <ItemTemplate >
    > <%# cnCustBullet15( Container.DataI tem("CustBullet 15"))%>
    > </ItemTemplate>
    > <FooterTemplate >
    > </table>
    > </FooterTemplate>
    > </asp:DataList>
    >
    >
    > --
    > Thanks!
    >
    > Troy
    >
    >
    >
    >
    >[/color]


    Comment

    • Jeremy Cowles

      #3
      Re: Checking For Null DB Fields

      "Troy" <devteam.at.cyb erwarehouse.com > wrote in message
      news:u5Bc6SCaDH A.388@TK2MSFTNG P10.phx.gbl...[color=blue]
      > Both of those were correct answers. Thank you. However, I am getting the
      > same error. Any other clues?
      >[/color]

      I have to assume that is is an ASP specific problem, in which case, I would
      ask the ASP.NET Group:

      microsoft.publi c.dotnet.framew ork.aspnet


      ~
      Jeremy

      Comment

      Working...