I know its a very silly question, but i have a little confusion on it, as i was answering a question today, i got confused in the comment of the questioner.
If i do like this in action:
public Action Result Index()
{
return View();
}
and my view:
@model MyModel
@Html.TextBoxFor(x=>x.Name)
and if i write action like this:
public Action Result Index()
{
return View(new MyModel());
}
what is the difference between these two actions, because i don't pass empty initialized model in that case also view is rendered.
I am attaching link as well of reference question its here: View Model Null when not explicitly passed by controller to strongly typed view