• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 579
  • Last Modified:

Error: End of statement expected.

The Code is outlined below. I get error point toward this line: " <%: Html.ActionLink("New Task", "Create")%> "

<%@ Page Title="" Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage((Of SimpleRMCI_TM.Models.Task)(Of SimpleRMCI_TM.Controllers.TaskFormViewModel)(Of SimpleRMCI_TM.Helpers.PaginatedList))" %>



<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>All Tasks</h2>

<p>
    <%: Html.ActionLink("New Task", "Create")%>
</p>

            <%= Html.DropDownList("TaskStatusList")%>

    <ul>
        <% For Each item In Model%>
    <li>
        <%= Html.ActionLink(item.TaskID, "Details", New With {.id = item.TaskID})%>
        <%= Html.Encode(item.TaskName.ToString())%>
        <%= Html.Encode(item.InsertDateTime.ToString())%>
    </li>
        <% Next%>
    </ul>
    <%  If (Model.HasPreviousPage) Then%>

    <%= Html.RouteLink("<<<", "Tasks", New With {.page = (Model.PageIndex - 1)})%>

    <% End If%>

    <%  If (Model.HasNextPage) Then%>

    <%= Html.RouteLink(">>>", "Tasks", New With {.page = (Model.PageIndex + 1)})%>

    <% End If%>  
</asp:Content>
0
patelankitm
Asked:
patelankitm
  • 3
  • 2
1 Solution
 
Daniel ReynoldsSoftware Applications Developer / IntegratorCommented:
change this
<%: Html.ActionLink("New Task", "Create")%>

to this

<%= Html.ActionLink("New Task", "Create")%>
0
 
patelankitmAuthor Commented:
Same Error.
0
 
brutaldevCommented:
Correct, for more information on the binding shortcuts they are explained here: http://naspinski.net/post/inline-aspnet-tags-sorting-them-all-out-(3c25242c-3c253d2c-3c252c-3c252c-etc).aspx
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
brutaldevCommented:
Nope, no matter how long I look at it I can't find fault with xDJR1875 solution.
0
 
patelankitmAuthor Commented:
The problem is solved by removing this line: (Of SimpleRMCI_TM.Controllers.TaskFormViewModel)
0
 
patelankitmAuthor Commented:
Removing the reference to the view model.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now