[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error: End of statement expected.

Posted on 2011-04-26
6
Medium Priority
?
565 Views
Last Modified: 2012-05-11
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
Comment
Question by:patelankitm
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:Daniel Reynolds
ID: 35469381
change this
<%: Html.ActionLink("New Task", "Create")%>

to this

<%= Html.ActionLink("New Task", "Create")%>
0
 

Author Comment

by:patelankitm
ID: 35469396
Same Error.
0
 
LVL 11

Expert Comment

by:brutaldev
ID: 35469403
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:brutaldev
ID: 35469462
Nope, no matter how long I look at it I can't find fault with xDJR1875 solution.
0
 

Accepted Solution

by:
patelankitm earned 0 total points
ID: 35469677
The problem is solved by removing this line: (Of SimpleRMCI_TM.Controllers.TaskFormViewModel)
0
 

Author Closing Comment

by:patelankitm
ID: 35499768
Removing the reference to the view model.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month17 days, 16 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question