throwing error on view page

Posted by rafipftec-24832 under ASP.NET MVC on 11/30/2013 | Points: 10 | Views : 1080 | Status : [Member] | Replies : 0
Hi all

this is a controller

public ActionResult Index()
var mostRecentEntries = (from entry in _db.Entries
orderby entry.DateAdded descending
select entry).Take(20);
var model = mostRecentEntries.ToList();
return View(model);

and a view is

@using Guestbook.Models

@model IEnumerable<Guestbook.Models.GuestbookEntry>
ViewBag.Title = "Index2";
<h2>Guest Book Entries</h2>


but when i run this its throwing error

Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments

Source Error:

Line 8: <dl>
Line 9: <dt>Name:</dt>
Line 10: <dd>@Model.Name</dd>
Line 11:
Line 12: <dt>Message</dt>

please help


(No response found.)

Login to post response