Checking For Null DB Fields

Discussion in 'ASP .Net' started by Troy, Aug 21, 2003.

  1. Troy

    Troy Guest

    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(CustBullet15)
    Return "<tr><td>NULL 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.DataItem("CustBullet15"))%>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </asp:DataList>


    --
    Thanks!

    Troy
    Troy, Aug 21, 2003
    #1
    1. Advertising

  2. Troy

    Troy Guest

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

    --
    Thanks!

    Troy



    "Troy" <devteam.at.cyberwarehouse.com> wrote in message
    news:...
    > 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(CustBullet15)
    > Return "<tr><td>NULL 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.DataItem("CustBullet15"))%>
    > </ItemTemplate>
    > <FooterTemplate>
    > </table>
    > </FooterTemplate>
    > </asp:DataList>
    >
    >
    > --
    > Thanks!
    >
    > Troy
    >
    >
    >
    >
    >
    Troy, Aug 21, 2003
    #2
    1. Advertising

  3. "Troy" <devteam.at.cyberwarehouse.com> wrote in message
    news:...
    > Both of those were correct answers. Thank you. However, I am getting the
    > same error. Any other clues?
    >


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

    microsoft.public.dotnet.framework.aspnet


    ~
    Jeremy
    Jeremy Cowles, Aug 21, 2003
    #3
    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. Replies:
    5
    Views:
    26,500
    Mike Schilling
    Mar 29, 2006
  2. call_me_anything
    Replies:
    4
    Views:
    453
    Pete Becker
    Sep 30, 2007
  3. Gawie Marais

    Checking the values of two form fields

    Gawie Marais, Jun 17, 2004, in forum: Javascript
    Replies:
    1
    Views:
    74
    Shawn Milo
    Jun 17, 2004
  4. JohnnyW
    Replies:
    6
    Views:
    130
    Dr John Stockton
    Mar 18, 2006
  5. DaveForgotHisEngineering

    Newbie problem checking input fields

    DaveForgotHisEngineering, Aug 26, 2008, in forum: Javascript
    Replies:
    3
    Views:
    82
    Dr J R Stockton
    Aug 27, 2008
Loading...

Share This Page