NAGARAJU TAMADA

NAGARAJU TAMADA

  • NA
  • 205
  • 286.3k

ActionLink Error

Sep 4 2013 5:54 AM
Hi all,
I just lost the whole detailed post because I forgot to add a subject line so I am going to make this short and sweet. I added a template to my new MVC 3 project copying new code to my new layout from the old base _layout.cshtml.  The website runs as expected but now I an error because the new layout is not recognizing the below code:

<li>@Html.ActionLink("Home", "Index", "Home")</li> <li>@Html.ActionLink("About", "About", "Home")</li>ActionLink

from above is not recognized and it is prompting or asking if I am missing a directive or using statement.  Is there any documetation on what needs to be added to call ActionLink. THe other layout does not have anything that I see that calls ActionLink as the ways C# uses the using to call objects. 
'System.Web.Mvc.HtmlHelper<object>' does not contain a definition for 'ActionLink' and no extension method 'ActionLink' accepting a first argument of type 'System.Web.Mvc.HtmlHelper<object>' could be found (are you missing a using directive or an assembly reference?)


Thanks & Regards

NagaRaju T

Answers (4)