Ok, it may be a silly question, but how do I reference my ViewModel object that I passed to the View in asp.net mvc?
so say my controller action has this at the end
return View(myModelObject);
in my view, how do I refer to it? Please use razor syntax.
You just need 2 steps
use @model in the header of your view (with small letter m)
@model MyNamespace.MyModelObject
use the mode in your code inside a block or line statement as the following
Line
Block
}
and remember you will use capital letter M