How do you get route values in the view

asp.net-mvc, asp.net-mvc-4, razor

Solution

Don't rule out keeping it simple:

public ActionResult Action(int id)
{
    return View( id);
}

Indicate the type of the Model we're dealing with

@model int 

And refer to the value in a strongly typed way via:

@Model

Problem

Is there an alternative to get the route value in the view page instead of read it like querystring? ``` @Html.ActionLink("Language Resources", "Index", "LanguageResource", new { languageCode = Request.QueryString["languageCode"] , "") ```

Original source