I have a controller action like this:
public ActionResult Test(string par)
{
Model myMod = new Model();
myMod.Attribute = par;
return View(myMod);
}
In the Test View I'd like to retrieve and print that attribute...
like this:
@model Project.Models.Model
@Html.DisplayFor(model => model.Attribute)
But by doing in that way I'm not able to retrieve the data from the action.
paris set when you call the action?localhost:8090/Home/Test/thisisthevalueand I suppose it opens a page, since the View is ok, with "thisisthevalue" displayed.