Wednesday, 7 August 2013

is there a way that I can pass just an integer to my view without creating a model in mvc

is there a way that I can pass just an integer to my view without creating
a model in mvc

I have a controller which calls a view. Is there a way I can pass just an
integer to my view an be able to use that integer in my view with razor
code?
Here is my method in my controller:
public ActionResult Details(int linkableId)
{
return View(linkableId);
}
After returning my view, can I access just this int using razor code like
this or something:
@linkableId

No comments:

Post a Comment