'New Record Entry form using C# MVC, opening view from controller requires Model name parameter in one form, but why not in other?
In my project, I have several data entry forms. In one of those, I'm simply calling a view from the controller as shown below
public ActionResult Create()
{
return View("NewVisitorForm");
}
In other actions, I had to provide a new instance of the model?
public ActionResult AddUser()
{
return View("NewUser", new LoginModel());
}
Now both of them work fine, just wondering why?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
