Sorry to re-open an old thread, but I am having this problem using Visual Studio 2005 8.0.50727.42:
Here is my markup:
<div id="ContentBox4" class="ContentBox">
The most requested items:-
<ul>
<% For Each drow As Data.DataRow In
ServiceInteraction.Service.ItemOffers_Get_Top5Requests.Tables(0).Rows
' Work out how long ago it was posted:
Dim timePosted As TimeSpan =
Now.Subtract(CDate(drow.Item("dateListed")))
%>
<li>
<a
href="ViewItem/ViewItem.aspx?ItemID=<%=drow.item("itemID")%>">
<%=drow.Item("itemName")%></a> [in
<%=drow.Item("categoryName")%>]
<br />
<em><%=drow.Item("requests")%>
<% If CInt(drow.Item("requests")) = 1 Then%>
request.
<% Else%>
requests.
<% end if %>
</em>
<br
/>
<%
If timePosted.Days > 0 Then
Response.Write("...... " & timePosted.Days & " days and " &
timePosted.Hours & " hours ago")
ElseIf timePosted.Hours = 0 AndAlso timePosted.Days = 0 Then
Response.Write("...... " & timePosted.Minutes & " minutes ago")
Else
Response.Write("...... " & timePosted.Hours & " hours ago")
End If
%>
</li>
<%Next%>
</ul>
</div>
I am getting blue-squiggly line and the error "Name __o is not declared" on the following lines:
- The first <li>
- <%=drow.Item("itemName")%>
- <%=drow.Item("categoryName")%>
- <%=drow.Item("requests")%>
Thanks in advance for any advice anybody can offer.
Similar to the above posts, this shows as a build error in the IDE -
yet the project builds fine ("Build Succeeded" and it looks exactly
right in browsers.
Best wishes,
Ben.