Checking For Null DB Fields

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

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>
 
Both of those were correct answers. Thank you. However, I am getting the
same error. Any other clues?
 
Troy said:
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
 
Back
Top