Checking For Null DB Fields

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>
 
T

Troy

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

Jeremy Cowles

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top