Answered by:
Warning Error "Name '_o' is not declared"

Question
-
User-2089506584 posted
Hi,
I can run the page successfully but I'm getting a warning error "Name '_o' is not declared". [:(]
<%@ Page Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of List(Of MvcApplication1.Movie))" %>
<asp:Content ID="indexHead" ContentPlaceHolderID="head" runat="server">
<title>Home Page</title>
</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<h2>
<%--<%= Html.Encode(ViewData("Message")) %>--%></h2>
<%
For Each m In Model
%>
Title: <%=m.Title()%><br />
Director: <%=m.Director()%><br />
<%=Html.ActionLink("Edit", "Edit", New With {.id = m.id})%>
<%=Html.ActionLink("Delete", "Delete", New With {.id = m.id})%>
<hr />
<%
Next
%>
<%=Html.ActionLink("Add Movie", "Add")%>
</asp:Content>Friday, February 13, 2009 8:24 AM
Answers
-
User852981412 posted
Hi,
Are Title and Movie methods? If they are properties remove the parentheses
Apparently doing a clean and rebuild (Build menu option) can also help solve this problem.
Regards,Paul
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 13, 2009 12:07 PM -
User-1660457439 posted
Known bug in the VB compiler, but it's harmless. If you want the warning to go away, put <%= "" %> on a line by itself directly after the <%@ Page %> directive.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 13, 2009 1:38 PM
All replies
-
User852981412 posted
Hi,
Are Title and Movie methods? If they are properties remove the parentheses
Apparently doing a clean and rebuild (Build menu option) can also help solve this problem.
Regards,Paul
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 13, 2009 12:07 PM -
User-1660457439 posted
Known bug in the VB compiler, but it's harmless. If you want the warning to go away, put <%= "" %> on a line by itself directly after the <%@ Page %> directive.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 13, 2009 1:38 PM -
User379782785 posted
I used that directive, but it did not clear up the IDE errors. Any idea why?
Thursday, February 26, 2009 8:54 AM -
User-1660457439 posted
I used that directive, but it did not clear up the IDE errors. Any idea why?Can you copy + paste your view here? (If your view is large, please try reducing it to the smallest we need to reproduce the problem.)
Thursday, February 26, 2009 1:31 PM