W
Wayne Wengert
I am working through some ASP.NET tutorials and trying to adapt some of them
to my data. I built an aspx page that pulls data from an SQL server with a
query and use a repeater control to display it. As long as I use the format
of:
<ItemTemplate>
<tr bgcolor="#f0f0f0">
<td><%#Container.DataItem("CircuitName")%> </td>
<td><%#Container.DataItem("CircuitCity")%> </td>
<td><%#Container.DataItem("CircuitState")%> </td>
things work great but I need to apply some processing to some of the data
and when I try code like:
<%
If (Len(#Container.DataItem("WebPageURL")) <2) Then
Response.Write( "<td>None Given</td>")
Else
........
I get errors such as the following:
Compiler Error Message: BC30201: Expression expected.
Source Error:
Line 54: <%
Line 55: Dim tmpSTR
Line 56: If (Len(#Container.DataItem("WebPageURL")) <2) Then
Line 57: Response.Write( "<td>None Given</td>")
Line 58: Else
It appears that it doesn't like the way I am trying to check the length of
the field.
Any pointers to how this should be done?
TIA
Wayne
to my data. I built an aspx page that pulls data from an SQL server with a
query and use a repeater control to display it. As long as I use the format
of:
<ItemTemplate>
<tr bgcolor="#f0f0f0">
<td><%#Container.DataItem("CircuitName")%> </td>
<td><%#Container.DataItem("CircuitCity")%> </td>
<td><%#Container.DataItem("CircuitState")%> </td>
things work great but I need to apply some processing to some of the data
and when I try code like:
<%
If (Len(#Container.DataItem("WebPageURL")) <2) Then
Response.Write( "<td>None Given</td>")
Else
........
I get errors such as the following:
Compiler Error Message: BC30201: Expression expected.
Source Error:
Line 54: <%
Line 55: Dim tmpSTR
Line 56: If (Len(#Container.DataItem("WebPageURL")) <2) Then
Line 57: Response.Write( "<td>None Given</td>")
Line 58: Else
It appears that it doesn't like the way I am trying to check the length of
the field.
Any pointers to how this should be done?
TIA
Wayne